On my Linux box using an older javaws I can pass a system property to Java via javaws with something like
javaws -J-Dsome.key=some.value http://some.jnlp
However it seems on my Mac using a newer version of javaws this does not work. The "-Dsome.key=some.value" is not passed to the java process (looking at the java process launched by javaws, the -D option is simply not there). However, other Java options are passed without issue, eg.
javaws -J-verbose:gc http://some.jnlp
works fine on both Linux and Mac (I can see the -verbose:gc option fine in the java process launched by javaws).
Does anyone have any ideas? Is it a security setting? Is it a bug in javaws on Mac?
You can do that via Java Control Panel. Goto Java Control Panel > Java > View..
Then type -Dsome.key=some.value under "Runtime Parameters".
Edit: Alternatively you can make sure that your parameters start with "jnlp." such as jnlp.some.key. The reason for this is that with new security restrictions in java you're not allowed to pass parameters unless you either sign you jnlp file (done through jar file manifest) or start your parameter with "jnlp." or "javaws."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With