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

Replacing os.name for operating system customization

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • None
    • 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)

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

              Created:
              Updated:
              Resolved: