Login  Register

Re: Java17 compatibility error ??

Posted by andrewk1972 on Oct 03, 2024; 11:12pm
URL: https://forum.jogamp.org/Java17-compatibility-error-tp4043006p4043542.html

Hi!
I have the same error/exception =>

Caught AppContextInfo(Bug 1004) InaccessibleObjectException: Unable to make public static sun.awt.AppContext sun.awt.AppContext.getAppContext() accessible: module java.desktop does not "exports sun.awt" to unnamed module @eb21112 on thread J3D-Renderer-1

As you suggested to OP, I added "‐‐add-opens=java.desktop/sun.awt=ALL-UNNAMED" to the VM arguments in Eclipse IDE 'Run Configurations..."

However, this did not work. Now I get:

Error: Could not find or load main class ‐‐add-opens=java.desktop.sun.awt=ALL-UNNAMED
Caused by: java.lang.ClassNotFoundException: ‐‐add-opens=java.desktop.sun.awt=ALL-UNNAMED

It appears it's trying to load the VM arguments as a class...?!?!??!?
WTF?

What am I missing?

I'm using:
MacOS Big Sur
Eclipse 4.33
Java SDK 23
JOGL 2.5.0
Java3D 1.7.1