Launch External Applications Through Java Program
Chapter:
Interview Programs
Last Updated:
26-08-2016 15:19:15 UTC
Program:
/* ............... START ............... */
import java.io.IOException;
public class JavaLaunchExternalApplication {
public static void main(String[] args) {
Runtime runtime = Runtime.getRuntime();
try {
runtime.exec("notepad.exe"); // opens new notepad instance
// OR runtime.exec("notepad");
} catch (IOException e) {
e.printStackTrace();
}
}
}
/* ............... END ............... */
Tags
Launch External Applications Through Java Program, Miscellaneous