How to start a java-web-start application and wait until it exits?

丶灬走出姿态 提交于 2019-12-10 15:33:03

问题


I just found out that javaws -wait doesn't do what is supposed to do on Windows. It will return before the aplication finishes.

This bug is more than 5 years old and closed as won't fix 6281477, so we need a workaround.

I looking for a clean solution that will:

  • run unattended (no user intervention):
    • currently if JNLP file is not accessible, Java will display an error window.
  • if application fails for any reason we need a return code different from 0

It would be preferable to have a cross platform solution for this Java or Python but it would be acceptable even a Windows batch solution.


回答1:


If you don't need your application to be booted from the web (which, from your question, I assume is the case), use javaw instead.

I believe it will give what you want.



来源:https://stackoverflow.com/questions/3810893/how-to-start-a-java-web-start-application-and-wait-until-it-exits

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!