Reputation: 23
I have an application that I can launch with two differents versions of java:
I checked the lookandfile init in the application but it doesn't seem to affect this behaviour.
I use Swing and Jide 3.6.0 librairy
Has someone an idea why this behavior is happening when I upgrade java version from 8u45 to 8u171 ?
Thanks for your help :)
Edit :
The application is running on Windows.
I use com.sun.java.swing.plaf.windows.WindowsLookAndFeel, given by UIManager.getLookAndFeel()
Upvotes: 2
Views: 132
Reputation: 66
It is linked to the system property os.name. Since windows 8.1, the GetVersionEx function has been deprecated whereas old version of java 8 such as 8u45 are based on this function to feed this system property.
For more information : https://learn.microsoft.com/en-us/windows/win32/sysinfo/targeting-your-application-at-windows-8-1
So that when you launch a jvm with this version of java, it will consider windows 8.1 os name and apply its skin. A quick test can support this statement by displaying System.getProperty("os.name") with the old jdk 8u45 :
I suppose later version of java 8 fixed this issue and retrieve the good os name. For example with jdk u171 :
Upvotes: 1