-
Notifications
You must be signed in to change notification settings - Fork 235
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
Issues with JDK9 #452
Comments
Just a short update - I will be patching known JDK 9 -related issues somewhere around the middle of the next week. Fixes will only be going into the Although I still do not recommend running WebLaF under JDK 9 ea builds as there might be more issues hidden from sight as I haven't properly tested it yet. |
I have fixed a few issues that have been appearing under JDK 9 and 10. I have also updated the mechanism that detects JDK version to be properly able to run version-related code and patched some of that version-related code to work under JDK 9+. These changes have been added with 57ab5dd commit in |
When I use the 1.2.9-snapshot version, The "AA_TEXT_PROPERTY_KEY" exception is gone. But I still have issues with xstream v1.4.9 used by weblaf. See this issue |
r4282 2018-06-08 Note 1: the following warning shows up when starting mars-sim : WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/C:/Users/mk/.m2/repository/com/thoughtworks/xstream/xstream/1.4.9/xstream-1.4.9.jar) to field java.util.TreeMap.comparator See issue x-stream/xstream#101 Note 2: weblaf has resolved a java 9 compatibility issue due to the exception by "AA_TEXT_PROPERTY_KEY" in 1.2.9-SNAPSHOT. However, the xtream library is still using reflection that's deemed "illegal" in Java 9. See issue mgarin/weblaf#452 # CHANGES 1. Revert back weblaf-ui and weblaf-core to 1.2.9-SNAPSHOT for Java 9 compatibility. 2. Revise class relating to sponsors' mission objectives. Will code in the use of these objectives in future.
There is, unfortunately, no good way to avoid those warnings anyhow right now. I've already investigated this problem when I was trying to fix all JDK9+ issues. Basically you get those warnings because some part of your code (or any library you use) is doing some "illegal" Reflection operations. Like accessing a private field, changing a final field value, calling private methods or constructors etc. Those operations can now be allowed only if you have configured your module permissions in a specific way. Obviously default JDK modules are NOT configured to allow anyone to access such stuff. Which basically means that, for instance, you can only use publicly opened APIs in Swing framework which is quite bad for many practical cases. XStream does take a big part in WebLaF's Reflection usage, but it is also used within the library for other things. A lot actually. Its main use is still configuring components and UIs, but quite a few "illegal" things are also done to go around Swing limitations and some badly designed APIs. There are also quite a few Reflection usages that help supporting various features on different JDK versions without directly touching proprietary APIs. There is only one approach that would allow you to avoid these warnings on JDK9+ but it is rather inconvenient. You can use There are quite a few articles around the internet explaining how those options work, for example: I have tried opening all required modules some time ago and it did work for me with earlier JDK9 version, but I ended up never using those options. |
There are quite a few problems that appeared on JDK 9.
One of them was mentioned by @Abu-Abdullah on Gitter:
It seems that there were major changes to the internal text rendering made in JDK 9 and the field requested above doesn't exist anymore. To be even more precise -
AATextInfo
class doesn't exist anymore and was replaced by commonGraphics2D
settings.There are also some other issues which can be seen in runtime on the lists related to reflection API usage.
The text was updated successfully, but these errors were encountered: