/**
* Open windows notepad.
*
*
*/
public class RuntimeTest {
/**
* open notepad using Runtime class
*
*/
public static void openNotepad() {
try {
// open the notepad
Runtime.getRuntime().exec("notepad");
} catch (Exception e) {
System.out.println("Error Occured!!");
e.printStackTrace();
}
}
/**
* execution begin from here
*
* @param args
* command line arguments
*/
public static void main(String[] args) {
openNotepad();
}
}
No comments:
Post a Comment