Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os.name not returning Windows 10. #12260

Closed
erbeone opened this issue Mar 22, 2021 · 10 comments
Closed

os.name not returning Windows 10. #12260

erbeone opened this issue Mar 22, 2021 · 10 comments

Comments

@erbeone
Copy link

erbeone commented Mar 22, 2021

C:\Users\username\Downloads\OpenJDK8U-jdk_x86-32_windows_openj9_8u282b08_openj9-0.24.0\jdk8u282-b08\bin>ver
Microsoft Windows [Version 10.0.18363.1377]
C:\Users\username\Downloads\OpenJDK8U-jdk_x86-32_windows_openj9_8u282b08_openj9-0.24.0\jdk8u282-b08\bin>java -XshowSettings:properties -version
Property settings:
awt.toolkit = sun.awt.windows.WToolkit
com.ibm.cpu.endian = little
com.ibm.jcl.checkClassPath =
com.ibm.oti.configuration = scar
com.ibm.oti.shared.enabled = false
com.ibm.oti.vm.bootstrap.library.path = C:\Users\username\Downloads\OpenJDK8U-jdk_x86-32_windows_openj9_8u282b08_openj9-0.24.0\jdk8u282-b08\jre\bin\default
C:\Users\username\Downloads\OpenJDK8U-jdk_x86-32_windows_openj9_8u282b08_openj9-0.24.0\jdk8u282-b08\jre\bin
com.ibm.oti.vm.library.version = 29
com.ibm.system.agent.path = C:\Users\username\Downloads\OpenJDK8U-jdk_x86-32_windows_openj9_8u282b08_openj9-0.24.0\jdk8u282-b08\jre\bin
com.ibm.util.extralibs.properties =
com.ibm.vm.bitmode = 32
com.ibm.zero.version = 2
file.encoding = Cp1252
file.encoding.pkg = sun.io
file.separator =
ibm.signalhandling.rs = false
ibm.signalhandling.sigchain = true
ibm.signalhandling.sigint = true
ibm.system.encoding = Cp1252
java.awt.fonts =
java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment
java.awt.printerjob = sun.awt.windows.WPrinterJob
java.class.path = .
java.class.version = 52.0
java.compiler = j9jit29
java.endorsed.dirs = C:\Users\username\Downloads\OpenJDK8U-jdk_x86-32_windows_openj9_8u282b08_openj9-0.24.0\jdk8u282-b08\jre\lib\endorsed
java.ext.dirs = C:\Users\username\Downloads\OpenJDK8U-jdk_x86-32_windows_openj9_8u282b08_openj9-0.24.0\jdk8u282-b08\jre\lib\ext
java.fullversion = 1.8.0_282-b08
JRE 1.8.0 Windows 8.1 x86-32-Bit 20210120_826 (JIT enabled, AOT enabled)
OpenJ9 - 345e1b0
OMR - 741e94ea8
JCL - ab07c6a8fd based on jdk8u282-b08
java.home = C:\Users\username\Downloads\OpenJDK8U-jdk_x86-32_windows_openj9_8u282b08_openj9-0.24.0\jdk8u282-b08\jre
java.io.tmpdir = C:\Users\username\AppData\Local\Temp
java.library.path = C:\Users\username\Downloads\OpenJDK8U-jdk_x86-32_windows_openj9_8u282b08_openj9-0.24.0\jdk8u282-b08\jre\bin\default
C:\Users\username\Downloads\OpenJDK8U-jdk_x86-32_windows_openj9_8u282b08_openj9-0.24.0\jdk8u282-b08\jre\bin
C:\WINDOWS\SysWOW64
C:\WINDOWS
C:\Users\username\Downloads\OpenJDK8U-jdk_x86-32_windows_openj9_8u282b08_openj9-0.24.0\jdk8u282-b08\bin
.
java.runtime.name = OpenJDK Runtime Environment
java.runtime.version = 1.8.0_282-b08
java.specification.name = Java Platform API Specification
java.specification.vendor = Oracle Corporation
java.specification.version = 1.8
java.vendor = AdoptOpenJDK
java.vendor.url = https://adoptopenjdk.net/
java.version = 1.8.0_282
java.vm.info = JRE 1.8.0 Windows 8.1 x86-32-Bit 20210120_826 (JIT enabled, AOT enabled)
OpenJ9 - 345e1b0
OMR - 741e94ea8
JCL - ab07c6a8fd based on jdk8u282-b08
java.vm.name = Eclipse OpenJ9 VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Oracle Corporation
java.vm.specification.version = 1.8
java.vm.vendor = Eclipse OpenJ9
java.vm.version = openj9-0.24.0
jdk.extensions.name = Extensions for OpenJDK for Eclipse OpenJ9
jdk.extensions.version = 8.0.282.0
line.separator = \r \n
os.arch = x86
os.encoding = UTF8
os.name = Windows 8.1
os.version = 6.3
path.separator = ;
sun.arch.data.model = 32
sun.boot.class.path = C:\Users\username\Downloads\OpenJDK8U-jdk_x86-32_windows_openj9_8u282b08_openj9-0.24.0\jdk8u282-b08\jre\bin\default\jclSC180\vm.jar
C:\Users\username\Downloads\OpenJDK8U-jdk_x86-32_windows_openj9_8u282b08_openj9-0.24.0\jdk8u282-b08\jre\lib\se-service.jar
C:\Users\username\Downloads\OpenJDK8U-jdk_x86-32_windows_openj9_8u282b08_openj9-0.24.0\jdk8u282-b08\jre\lib\rt.jar
C:\Users\username\Downloads\OpenJDK8U-jdk_x86-32_windows_openj9_8u282b08_openj9-0.24.0\jdk8u282-b08\jre\lib\resources.jar
C:\Users\username\Downloads\OpenJDK8U-jdk_x86-32_windows_openj9_8u282b08_openj9-0.24.0\jdk8u282-b08\jre\lib\jsse.jar
C:\Users\username\Downloads\OpenJDK8U-jdk_x86-32_windows_openj9_8u282b08_openj9-0.24.0\jdk8u282-b08\jre\lib\charsets.jar
C:\Users\username\Downloads\OpenJDK8U-jdk_x86-32_windows_openj9_8u282b08_openj9-0.24.0\jdk8u282-b08\jre\lib\jce.jar
sun.boot.library.path = C:\Users\username\Downloads\OpenJDK8U-jdk_x86-32_windows_openj9_8u282b08_openj9-0.24.0\jdk8u282-b08\jre\bin\default
C:\Users\username\Downloads\OpenJDK8U-jdk_x86-32_windows_openj9_8u282b08_openj9-0.24.0\jdk8u282-b08\jre\bin
sun.cpu.endian = little
sun.desktop = windows
sun.io.unicode.encoding = UnicodeLittle
sun.java.launcher = SUN_STANDARD
sun.jnu.encoding = Cp1252
user.country = US
user.dir = C:\Users\username\Downloads\OpenJDK8U-jdk_x86-32_windows_openj9_8u282b08_openj9-0.24.0\jdk8u282-b08\bin
user.home = C:\Users\username
user.language = en
user.name = username
user.timezone =
user.variant =

openjdk version "1.8.0_282"
OpenJDK Runtime Environment (build 1.8.0_282-b08)
Eclipse OpenJ9 VM (build openj9-0.24.0, JRE 1.8.0 Windows 8.1 x86-32-Bit 20210120_826 (JIT enabled, AOT enabled)
OpenJ9 - 345e1b0
OMR - 741e94ea8
JCL - ab07c6a8fd based on jdk8u282-b08)

@pshipton
Copy link
Member

pshipton commented Mar 22, 2021

I believe this is a signing problem, the build is not signed properly to recognize Windows 10. Please open this issue at https://github.com/AdoptOpenJDK/openjdk-support instead since it's AdoptOpenJDK.net that does the signing.

@pshipton
Copy link
Member

@AdamBrousseau fyi

@pshipton
Copy link
Member

pshipton commented Mar 22, 2021

I guess I'm not sure if this is a signing problem or a build setup problem. I know the same code is used for IBM Java 8, and this build detects "Windows 10".

The code uses some macros.

#if defined(_WIN32_WINNT_WINBLUE) && (_WIN32_WINNT_MAXVER >= _WIN32_WINNT_WINBLUE)
...
#if defined(_WIN32_WINNT_WIN10) && (_WIN32_WINNT_MAXVER >= _WIN32_WINNT_WIN10)
			if (IsWindows10OrGreater()) {
				/* May need to check ReleaseId when next Windows version is released */
				PPG_si_osType = "Windows 10";
			} else
#endif /* defined(_WIN32_WINNT_WIN10) && (_WIN32_WINNT_MAXVER >= _WIN32_WINNT_WIN10) */

@pshipton
Copy link
Member

pshipton commented Mar 22, 2021

I note that OpenJ9 Java 11 is showing "Windows 10", although it compiles with VS2017 while Java 8 compiles with VS2013.

@pshipton
Copy link
Member

pshipton commented Mar 22, 2021

The OpenJ9 Java 8 0.23 build that compiled with VS2010 is working to detect Windows 10.

@pshipton
Copy link
Member

Now I think this is a problem with the VS2013 compilation environment, given that it was working before #10892

@jdekonin maybe we are missing a Windows 10 dev kit or something?

@pshipton
Copy link
Member

Trying a simple test, I find that _WIN32_WINNT_WINBLUE is not defined in the VS2010 environment, which causes the code to use GetVersionEx() instead. In the VS2013 environment, _WIN32_WINNT_WINBLUE is defined, but not _WIN32_WINNT_WIN10.

pshipton added a commit to pshipton/omr that referenced this issue Mar 22, 2021
If _WIN32_WINNT_WIN10 isn't defined, use GetVersionEx() to detect
Windows 10.

Issue eclipse-openj9/openj9#12260

Signed-off-by: Peter Shipton <[email protected]>
@pshipton
Copy link
Member

Testing a code change.

pshipton added a commit to pshipton/omr that referenced this issue Mar 23, 2021
If _WIN32_WINNT_WIN10 isn't defined, which it isn't for VS2013, use
deprected GetVersionEx() to detect Windows 10.

Issue eclipse-openj9/openj9#12260

Signed-off-by: Peter Shipton <[email protected]>
pshipton added a commit to pshipton/omr that referenced this issue Mar 23, 2021
This fixes two problems. If _WIN32_WINNT_WIN10 isn't defined, which it
isn't for VS2013, use deprecated GetVersionEx() to detect Windows 10.
Also query the Windows 10 build number instead of hard coding an old
build number.

Issue eclipse-openj9/openj9#12260

Signed-off-by: Peter Shipton <[email protected]>
pshipton added a commit to pshipton/omr that referenced this issue Mar 23, 2021
This fixes two problems. If _WIN32_WINNT_WIN10 isn't defined, which it
isn't for VS2013, use deprecated GetVersionEx() to detect Windows 10.
Also query the Windows 10 build number instead of hard coding an old
build number.

Issue eclipse-openj9/openj9#12260

Signed-off-by: Peter Shipton <[email protected]>
@pshipton
Copy link
Member

The OMR fixes are merged, tomorrow they should promote to the OpenJ9 project and get into the head stream. Then we can see about adding them to the 0.26 release branch.

pshipton added a commit to pshipton/omr that referenced this issue Mar 24, 2021
If _WIN32_WINNT_WIN10 isn't defined, which it isn't for VS2013, use
deprected GetVersionEx() to detect Windows 10.

Issue eclipse-openj9/openj9#12260

Signed-off-by: Peter Shipton <[email protected]>
pshipton added a commit to pshipton/omr that referenced this issue Mar 24, 2021
This fixes two problems. If _WIN32_WINNT_WIN10 isn't defined, which it
isn't for VS2013, use deprecated GetVersionEx() to detect Windows 10.
Also query the Windows 10 build number instead of hard coding an old
build number.

Issue eclipse-openj9/openj9#12260

Signed-off-by: Peter Shipton <[email protected]>
@pshipton
Copy link
Member

Fixed for 0.26.0 via eclipse-openj9/openj9-omr#103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants