Exception on macOS with Java 16

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Exception on macOS with Java 16

Postby robert » Sat Sep 25, 2021 7:39 pm

I am using Jide Common Layer in an application on macOS, using Java 16. Jide works with previous Java versions, but fails with Java 16 on macOS. I receive following exception:

Code: Select all
Exception in thread "AWT-EventQueue-0" java.lang.IllegalAccessError: com/apple/laf/AquaPopupMenuUI is not visible
   at java.base/java.lang.ClassLoader.defineClassImpl(Native Method)
   at java.base/java.lang.ClassLoader.defineClassInternal(ClassLoader.java:491)
   at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:452)
   at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
   at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:1167)
   at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:954)
   at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:862)
   at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:820)
   at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:182)
   at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1111)
   at java.desktop/javax.swing.UIDefaults.getUIClass(UIDefaults.java:721)
   at java.desktop/javax.swing.UIDefaults.getUI(UIDefaults.java:788)
   at java.desktop/javax.swing.UIManager.getUI(UIManager.java:1069)
   at com.jidesoft.swing.JidePopupMenu.updateUI(Unknown Source)
   at java.desktop/javax.swing.JPopupMenu.<init>(JPopupMenu.java:188)
   at java.desktop/javax.swing.JPopupMenu.<init>(JPopupMenu.java:173)
   at com.jidesoft.swing.JidePopupMenu.<init>(Unknown Source)
robert
 
Posts: 41
Joined: Thu Apr 03, 2008 6:56 am

Re: Exception on macOS with Java 16

Postby JIDE Support » Sat Sep 25, 2021 9:10 pm

You need to use --add-export jvm parameter to expose those classes to JIDE.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: Exception on macOS with Java 16

Postby robert » Sun Sep 26, 2021 1:18 pm

Thanks, that worked. In case anyone else encounters this issue, this is the jvm argument required:
Code: Select all
--add-exports java.desktop/com.apple.laf=ALL-UNNAMED
robert
 
Posts: 41
Joined: Thu Apr 03, 2008 6:56 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: Google [Bot] and 10 guests

cron