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

Add a new launcher environment variable JAVA_OPTIONS

XMLWordPrintable

    • b155
    • Verified

        `_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.

              henryjen Henry Jen
              mchung Mandy Chung (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              15 Start watching this issue

                Created:
                Updated:
                Resolved: