Skip to content
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

Caught AppContextInfo(Bug 1004) IllegalAccessException: class com.jogamp.nativewindow.awt.AppContextInfo cannot access class sun.awt.AppContext (in module java.desktop) because module java.desktop does not export sun.awt to unnamed module @34a3d150 on thread main #11

Open
jzy3d opened this issue Dec 13, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@jzy3d
Copy link
Owner

jzy3d commented Dec 13, 2021

Discussed here.

May workaround this with VM option up to Java 16 included : java --illegal-access=permit -jar my.jar

This won't work for Java 17. At build/test time, Julien suggests

I've just added this at line 486 in jogl/make/build-test.xml:
<jvmarg line="--add-opens=java.desktop/sun.awt=ALL-UNNAMED"/>

So running programs with these JVM args fixes the problem : --add-opens=java.desktop/sun.awt=ALL-UNNAMED

Which also works to avoid this illegal access exception at runtime on Java 17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant