Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java Web Start problem with -J run-option on last JRE 7u65

RomBorJul 25 2014 — edited Aug 26 2014

I run my application using Java Web Start (JNLP file), but through a batch file. JNLP file has fixed content and additional parameter (file name) is sent to javaws by a JVM option -J as follows:

"C:\Program Files\Java\jre7\bin\javaws.exe" -J-DmyFile="local://%~1" myjnlp.jnlp

Before the last update of the JRE everything running properly and I can get value of my parameter "myFile" by calling method System.getProperty("myFile").

After last update (JRE 7u65) parameter "myFile" is not included in the system property list and therefore my application do not work.

I found, however, that there is a system property "jnlpx.vmargs", which contains JVM options supplied by user. However, this is only partially true.

In previous versions, this property contains "myFile" parameter in such a form as it was entered in option -J.

-DmyFile=local://C:\some_path\filename.ext

This is OK, beacause the parameter value can be extracted without problems.

But on "JRE 7u65 64-bit" value of the property "jnlpx.vmargs" is encoded using Base64. Problem is that it is not known which charset is used to encode source string. And in addition, if source string contains characters that are can not be encoded by used charset (accendent characters), it results to harm source string itself and decoding is not possible using any charset.

An inconvenient fact is that the property "jnlpx.vmargs" in "JRE 7u65 32-bit" does not contain parameter supplied by me at all. I it really do not understand...

I may be wrong, but I think that these issues are consequence of the fix of the bug reported here: http://bugs.java.com/view_bug.do?bug_id=8041339

I think that if you want to encode user-supplied JVM parameters, you should use suitable charset, and I think that it is UTF-8.

But better solution will be, if you leave user-supplied JVM parameters in the system property list as it was in older versions.

Roman

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 23 2014
Added on Jul 25 2014
9 comments
6,208 views