Login  Register

Re: Illegal reflective access with jogamp-java3d1.7.0-final

Posted by gouessej on Apr 02, 2023; 11:14pm
URL: https://forum.jogamp.org/Illegal-reflective-access-with-jogamp-java3d1-7-0-final-tp4042358p4042383.html

As I said, "Inconsistency detected " comes from some OpenJDK builds on some GNU Linux distributions. The only solution I know consists in using another OpenJDK build. You can look for posts about this problem on the forum, I had to do that in the past. Why not trying with Adoptium?
https://adoptium.net

You have to use several --add-opens clauses to get rid of the warnings:
--add-opens java.desktop/sun.awt=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED

Please don't put the equal sign between --add-opens and the JDK module name, it seems to be necessary only when you want to pass two consecutive JVM arguments as a single one in some IDE settings, with some build tools (Gradle, etc), when you run a JVM programmatically in a C program but not when you call directly java in command line, which is your case right now. Removing this equal sign helped in my case when trying to reproduce your problem with Java 11.

You can guess how to build other necessary --add-opens clause(s) with this rule:
--add-opens <module-name>/<package-name>=<module-name> where ALL-UNNAMED designates all unnamed modules as its name implies.

Sorry, it's one o'clock in France and I work tomorrow. I'm falling asleep.
Julien Gouesse | Personal blog | Website