private void execute() {
Runtime r=Runtime.getRuntime();
try {
Process p=r.exec("notepad.exe");
} catch (IOException e) {
e.printStackTrace();
}
}
Open a file in notepad with java
private void execute() {
Runtime r=Runtime.getRuntime();
try {
Process p=r.exec("notepad.exe C://yourfile.txt");
} catch (IOException e) {
e.printStackTrace();
}
}
Keine Kommentare:
Kommentar veröffentlichen