Closed sgjava closed 3 months ago
Thank you. With OS do you use for it?
Ubuntu 20.04.
Ok, I took some research. Since Java 9 you have to tell the compiler explicit which modules of the JDK are accessable. The module "java.desktop" contains the Swing classes. In the command line you can add --add-exports java.desktop/com.sun.java.swing.plaf=ALL-UNNAMED
to make the module accessable.
I added this command to the pom.xml and it works, but only for Java 9 and higher. It seems, I have to make a decision: support native Look-and-Feel or support old Java 8 version.
In my case the UI falls back to the dark LAF. Do you have the same behaviour?
So, you can use a profile in Maven too based on JDK http://www.avajava.com/tutorials/lessons/how-do-i-activate-a-profile-based-on-a-particular-version-of-java.html But honestly JDK 8 is pretty much EOL. JDK 11 has until 2023. I'm busy converting everything to JDK 17. LTS versions are the way to go.
I will close this issue, now. The main problem is the access to the java.desktop module, which contains the OS native LAF. The user has explicitly add --add-exports=java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED
to the run command to use the native LAF, otherwise UiBooster catches the exception and uses the default dark LAF.
This is with your latest code. You may want to fix this before release. Try against JDK 17.