Open mokun opened 3 years ago
This seems like an issue with newer Java version. You might have to add some extra JVM options to avoid it, I've mentioned it in the wiki article here: https://github.com/mgarin/weblaf/wiki/Java-9-and-higher
WebLaF is simply not able to access a proprietary method. This specific problem from the stack trace above should go away if you add this JVM option:
--add-opens java.desktop/com.apple.laf=ALL-UNNAMED
There is unfortunately no other way to workaround it right now - WebLaF has to use reflection to access multiple proprietary classes and methods to properly configure fonts, antialiasing and some other component settings.
I'm not sure if you've used any of these JVM options before and how it is related to switching to M1. My guess is - you simply have a newer JVM version (>=12) on your M1 that caused this issue to appear. On earlier JVM versions (<=11) reflection was not forcefully limited by default.
I'm not sure if you've used any of these JVM options before and how it is related to switching to M1. My guess is - you simply have a newer JVM version (>=12) on your M1 that caused this issue to appear. On earlier JVM versions (<=11) reflection was not forcefully limited by default.
Yes I just found out it that if I switch to using Java 11, instead of Java 15, the font problem in intelliJ for M1 goes away.
But are you able to avoid the problem with the JVM options?
Recently I've switched to using my new Apple mac mini with M1 CPU.
I have no problems running the core program.
However, as soon as I start the Swing windows which currently depends on Weblaf,
It could be just a font initialization error. It points to calling WebLookAndFeel.install() when it happens in my initializeWeblaf() in MainWindow.java
Can you think of any possible workarounds for this situation with M1 ?
Thanks !