Code:
import java.io.*;
public class startProg{
public void startProgram(String locationToStart) throws Exception{
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec(locationToStart);
}
compile a class file in the same directory as the program you're creating and then in your code add:
try{
startProg newProg = new startProg();
newProg.startProgram(locat
}
catch(Exception e){
e.printStackTrace();
}
to call a program.
Example:
startProg new Prog = new startProg();
newProg.startProgram("C:\\
Main Topics
Browse All Topics





by: objectsPosted on 2003-07-20 at 18:58:23ID: 8964350
Use the Runtime.exec() method.