How To: Launch A 2nd Java Program
In A Jar
If you have more than one Java windows program in a single jar file, you can launch any of the programs from any of the others, using this statement:
try{Runtime.getRuntime().exec("javaw -cp myjar.jar mypackage.myclass");}
catch(Exception e){}
...where
myjar.jar
is the name of the jar file, and
mypackage.myclass
is the full name of the Java program to run (e.g.,
lab8.MyBrowser
).