Replacing os.name for operating system customization

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 21
    • Affects Version/s: None
    • Component/s: core-libs
    • None
    • b16

      Selecting values and code within the JDK for specific operating system functions currently uses a runtime comparison with the `os.name` system property. As a runtime check, the comparison does not allow values or code for other operating systems to be eliminated and is not easily optimized away or handled at build time.

      Improvements should support OS specific customization for JDK internal use:
       - To select values and code; allowing elimination of unused code and values
       - Optionally evaluated by build processes, compilation, or archiving (i.e. CDS)
       - Simple API to replace adhoc comparisons with `os.name`
       - Clear and consistent use across build, runtime, and JDK modules

      Non-goals:
       - Not a public API
       - No support for hardware architecture enumeration (parallel and separate)

            Assignee:
            Roger Riggs
            Reporter:
            Roger Riggs
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: