As, it is easy to download jars and other artifacts using http://code.google.com/p/jnlpdownloader/
So, I am trying to execute my business application from a small launcher application(this launcher application is running as Java web start application).
This launcher application,
- first download executable business application jar from URL(available at runtime only)
- And then execute the executable business jar.
But, the following code doesn't seems to work, nor, it is throwing any exceptions
String[] command = {"java -jar", "JarFromURL.jar"};
Runtime r = Runtime.getRuntime();
try {
r.exec(command);
} catch (IOException e1) {
JOptionPane.showMessageDialog(null, "Voilla...") ;
}
execthrows 3 other exceptions besidesIOException, what are you doing with those? 2) Be sure to read & implement all the recommendation of When Runtime.exec() won't. By the looks of it, you copied that code from the back of a box of coco-pops. 3) UseProcessBuilderin this millennium.