How do you execute a JAR file within your source code?
I know that for an exe, you use
try
{
Runtime rt = Rintime.getRuntime() ;
Process p = rt.exec("Program.exe") ;
InputStream in = p.getInputStream() ;
OutputStream out = p.getOutputStream ();
InputSream err = p,getErrorStram() ;
//do whatever you want
//some more code
p.destroy() ;
}catch(Exception exc){/*handle exception*/}
Is it the same only:
rt.exec("program.exe")
changes to rt.jar("program.jar")
or is it something different?