JDK-8178072 : Document needed: Add a new launcher environment variable JDK_JAVA_OPTIONS
  • Type: Sub-task
  • Component: docs
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • CPU: generic
  • Submitted: 2017-04-04
  • Updated: 2017-09-07
  • Resolved: 2017-09-07
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.
JDK 9
9Fixed
Related Reports
Blocks :  
Description
JDK 9 launcher, java, prepend content of the environment variable JDK_JAVA_OPTIONS to the command line. The detail can be found in CCC http://ccc.us.oracle.com/8170832
Comments
The JDK_JAVA_OPTIONS section was staged for review at: http://review.us.oracle.com/review2/Review.html#reviewId=311171;scope=review;status=open,fixed;documentId=1622012;noteId=4089876 Review comments for this new section have been incorporated.
07-09-2017

The Release Note was added by JDK-8185446.
07-09-2017

Text was added to the doc but it needs review.
28-07-2017

The JDK_JAVA_OPTIONS environment variable has been documented in the Tools Ref doc and can be reviewed at: http://review.us.oracle.com/review2/Review.html#reviewId=311171;scope=document;status=open,fixed;documentId=1622012;fragment=GUID-3B1CE181-CD30-4178-9602-230B800D4FAE
27-07-2017

I think it is best to have a release note for this change that points to a section in a broader document.
18-04-2017

It should be doc task that fully describes this environment variable, including all the details in the CCC. No objection to also have a release note but that would be more of an FYI that points to the docs.
12-04-2017

I agree. I didn't find anything in the document, thus I cannot simply point it there. If we don't think this is release note worthy, should we simply close the as won't fix. Perhaps we should create a doc-task instead of release note?
12-04-2017

It's not clear to me that a release note is appropriate here. When browsing the JDK 10 docs then I would expect to find documentation describing this env variable. I assume I shouldn't be expected to know that it was added in JDK 9 and then search for the release notes to find info. If there is a release note for JDK 9 then I would assume it can be brief, more of an FYI that points to the docs where the env variable is described.
12-04-2017

The release note must be concise, so I suggest the following: Environment variable JDK_JAVA_OPTIONS may be used to prepend options to those specified on the command line. The option may be a list of arguments separated by white-space characters, and it must use the same encoding as as the java launcher supports on that system. Single or double quotes maybe used to quote options that contain white-space characters. The environment variable must not contain terminal options such as "-jar", "-h" and will cause the launcher to exit with an error message.
11-04-2017

The 'java' launcher now supports an environment variable, JDK_JAVA_OPTIONS, the content of which will be prepended to those specified on the command line. The format of the content should be a list of arguments separated by white-space characters. The encoding requirement for the environment variable is the same as java command line on the system, as the environment variable content is treated just like specified in the command line. Single(`'`) or double(`"`) quote can be used to enclose arguments which contain whitespace characters. All content between the open quote and the first matching close quote will be preserved by simply removing the pair of quotes. In case a matching quote is not found, the launcher will abort with an error message. @files are supported as they are specified in the command line. However, like in @files, wildcard is not supported in the environment variable. In order to mitigate potentially misuse of JDK_JAVA_OPTIONS interfering expected behavior, options that specify the main class(such as -jar) or cause java to exit without executing the main class(such as -h) are disallowed in the environment variable. If any of such options appears in the environment variable, the launcher will abort with an error message.
11-04-2017