Are javaws exit codes really broken?

2020-03-24 03:54发布

问题:

I was working to automate same java code execution using JNLP and I was surprised to discover that jawaws did not gave me a valid return code.

Original execution line was:

javaws -wait http://example.com:666/missing.jnlp

This did showed an ugly window with "Unable to launch application." message.

As you can image I tried to make this not require a GUI and tried:

javaws -wait -Xnosplash -import -silent http://example.com:666/missing.jnlp

But even if this command fails, it will still return 0, success.

How to solve this?

回答1:

This is Bug ID 6898437 in the Oracle/Sun bug tracker, and is fixed in more recent releases.