开发者

Launch External Jar through Java Application

Currently, I have an Java Standalone Swing Application.

Now, when user clicks on the button in the Swing Application, I would like to launch another Java Application (Say : calculator.jar)

May I know what is the portable way to do so? So that it will work 开发者_开发问答in multiple OS?


Either use Desktop#open() or just put it in classpath and invoke its main().


You should be able to just use java to run the jar.

Runtime.getRuntime().exec("java -jar calc.jar");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜