2

I have an application that I can launch with two differents versions of java:

  • with 8u45, my application get shade of blue application blue
  • with 8u171, my application get shade of white application white

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()

Gabriel D
  • 23
  • 5
  • What is the Look and Feel that you are using for Swing? Could it be that you are running this app on Windows? – Karol Dowbecki Jul 24 '19 at 16:26
  • It seems that I use com.sun.java.swing.plaf.windows.WindowsLookAndFeel, given by UIManager.getLookAndFeel(). And yes the application running on Windows. Good point :) thanks. – Gabriel D Jul 24 '19 at 16:34

1 Answers1

1

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 : System.getProperty("os.name")

I suppose later version of java 8 fixed this issue and retrieve the good os name. For example with jdk u171 :

System.getProperty("os.name")

Nicolas
  • 66
  • 2