Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8170832

Add a new launcher environment variable JAVA_OPTIONS

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b155
    • Verification:
      Verified

      Backports

        Description

        `_JAVA_OPTIONS` and `JAVA_TOOL_OPTIONS` environment variable are interpreted by the VM, not the launcher, hence no @-files or launcher-only options. The former is undocumented and unsupported but widely used; the latter is documented and supported.

        In JDK 9, javac adds a new `_JAVAC_OPTIONS` environment variable whose name was chosen to match `_JAVA_OPTIONS` but their semantics are not consistent (e.g. prepend vs append).

        There is no equivalent environment variable support in the `java` launcher.

        This proposes to introduce a new launcher enviornment variable `JAVA_OPTIONS` that is read by the java launcher. It will support multiple @files. Its content will be prepended to the actual command line; consistent with the current javac environment variable. Other JDK command-line tools will follow this general pattern `<TOOL>_OPTIONS`, if a tool-specific environment variable is supported.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                henryjen Henry Jen
                Reporter:
                mchung Mandy Chung
                Votes:
                0 Vote for this issue
                Watchers:
                15 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: