Reputation: 1609
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,
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...") ;
}
Upvotes: 0
Views: 609
Reputation: 6631
The array of parameters passed to exec() should be split this way.
String[] command = {"java", "-jar", "JarFromURL.jar"};
Upvotes: 1