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

Disable "best-fit" mapping on Windows environment variables

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 25
    • tools
    • None
    • behavioral
    • low
    • Hide
      As discussed in JDK-8337509, apps relying on this existing behavior is considered very few.
      Show
      As discussed in JDK-8337509 , apps relying on this existing behavior is considered very few.
    • add/remove/modify command line option
    • Implementation

      Summary

      Disable "best-fit" mapping on Java launcher's command line arguments from "JDK_JAVA_OPTIONS" environment variable on Windows

      Problem

      The CSR JDK-8337509 demonstrates the potential issues with command line arguments. Since the Java launcher can take additional command line arguments if "JDK_JAVA_OPTIONS" environment variable is defined, the same fix needs to be applied for those additional arguments.

      Solution

      Apply the same treatment as with JDK-8337506, ie, use Windows "W" API (_wgetenv()) to retrieve environment variable, then convert it back to code page based multi byte string without "best-fit" mapping.

      Specification

      N/A (behavioral change only)

            naoto Naoto Sato
            naoto Naoto Sato
            Jaikiran Pai, Justin Lu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: