Hello sgsamanthjain. Welcome to the Java Programming Forums.
In future, please make sure you post in the correct forum. I have moved this thread to -
Java Theory & Questions
You can open Notepad and other applications like this:
import java.io.IOException;
public class OpenApplication {
/**
* JavaProgrammingForums.com
*/
public static void main(String[] args) throws IOException {
// Opens Notepad
Process p1 = Runtime.getRuntime().exec("notepad");
// Opens Windows Calculator
Process p2 = Runtime.getRuntime().exec("C:\\WINDOWS\\system32\\calc.exe");
}
}
Runtime (Java Platform SE 6)
Execute an external program - Real's Java How-to