// Run the "notepad" program or a similar editor Process p = Runtime.getRuntime().exec("kwrite"); p.waitFor();