You are here: irt.org | FAQ | Java | Q4083 [ previous next ]
Check out the java.lang.Runtime class that provide access to the Java runtime system. This class has various methods that helps to implement system level services.
Here is a sample code which starts the notpad.
import java.lang.System;
import java.lang.Runtime;
import java.io.IOException;
public class loadNotepad
{
public static void main(String args[]) throws IOException
{
Runtime load = Runtime.getRuntime();
// getRuntime() method is a static method which is used to
// obtain access to an object of class Runtime.
r.exec("C:\\windows\\notpad.exe");
}
} // End of class loadNotpad