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...") ;
}
传递给exec()的参数数组应以这种方式拆分。
String[] command = {"java", "-jar", "JarFromURL.jar"};
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.