Review Request JDK-8175819: OS name and arch in JMOD files should match the values as in the bundle name

Mandy Chung mandy.chung at
Mon Apr 3 18:41:03 UTC 2017


This revisits the OS name and arch in packaging JDK modules
to extend the module descriptor with ModuleTarget class file
attribute.  We considered matching with the system properties.
Linux x64 JDK can run on a system whose `os.arch` system
property value can be `amd64` or `i586` or `x86_x64`.  
Similiarly, windows x86/x64 JDK can run on a system whose 
`` system property starts with “Windows” as the property is set to "Windows XXX" for example 
"Windows Server 2012 R2”.  It might be worth considering
multiple OS arch values in ModuleTarget in the future.

JDK bundle names are revised in JDK 9.  This is a good
alternative to be consistent with $OS-$ARCH value in 
the bundle names.  This patch proposes to package JDK modules 
with OS name and arch to match the values as in JDK bundle names.
jlink will generate the `release` file and set OS_NAME and
OS_ARCH to those values.  This also proposes to drop 
OS_VERSION to align with the ModuleTarget class file attribute.

This shows the old and new value of OS_NAME/OS_ARCH properties
in the `release` file:

            JDK 8               JDK 9
            -----               -----
OS_NAME     Linux               linux
            SunOS               solaris
            Darwin              osx
            Windows             windows
OS_ARCH     i386,x86            x86
            i586,amd64,x86_64   x64
            sparcv9             sparcv9
            arm                 arm32
            aarch64             arm64


More information about the jigsaw-dev mailing list