JDK-8211182 : Remove jdk.packager.services.UserJvmOptionsService
  • Type: Bug
  • Component: tools
  • Sub-Component: jpackage
  • Affected Version: internal
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-09-26
  • Updated: 2019-09-06
  • Resolved: 2018-10-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
internalFixed
Related Reports
Relates :  
Relates :  
Description
After some deliberation we have decided to remove The UserJvmOptionsService from jpackager.
The current implementation is not well thought out, nor does satisfy any pressing need.  We may reconsider this in a later release.
As a result  of this decision we need to remove:
1.) The main Interface UserJvmOptionsService.java in jdk.packager.services.
2.) The Service implementation in jdk.packager.services.userjvmoptions.
3.) The command line argument "--use-jvm-args"
4.) support code for implementation of any of the aboive.
Comments
Background: The documentation of the bundler argument userJVMOptions in javapackager in JDK9 is: ----------------- userJvmOptions=option=value JVM options that users can override. Any option that���s valid for the java command can be used. Specify both the option name and the value for the option. To pass more than one option, use multiple instances of the -B option, as shown in the following example: -BuserJvmOptions=-Xmx=128m -BuserJvmOptions=-Xms=128m ----------------- The basic underlying problem is that jvm arguments are not always of the form 'option=value'. The current implementation rejects any value for 'user-jvm-option" that does not contain an equals sign ("="). It then stores the options in a Map of key/value pairs (splitting at thefirst '='). The API to set the user options also takes a Map of key/value pairs. The current implementation does work for user-jvm-args that are of the form 'A=B', (such as '-Dfoo=bar') It is possible the existing implementation can be made to work for jvm args that do not cont equal sign - still investigating.
28-09-2018