Re: Illegal reflective access with jogamp-java3d1.7.0-final
Posted by RickLutowski on Mar 31, 2023; 11:07pm
URL: https://forum.jogamp.org/Illegal-reflective-access-with-jogamp-java3d1-7-0-final-tp4042358p4042366.html
gouesse,
Yes, followed the tutorial with respect to installing jogamp- java3d1.7.0, jogamp-fat-all, and jogamp-all-platforms. (Not sure if 'all-platforms' is really needed as removing it from the classpath seems to make no difference.) After changing the old javax imports in my application to org.jogamp the programs all compiled ok.
You are right, I did not notice the part about placing '–add-opens=java.desktop/sun.awt=ALL-UNNAMED' in the java execution statement. Here is my java statement after doing so
java –add-opens=java.desktop/sun.awt=ALL-UNNAMED -cp /usr/local/_jreality:/usr/local/_jreality/j3dcore.jar:/usr/local/_jreality/jogamp-fat.jar:/usr/local/_jreality/vecmath.jar <main_classname>
and the result:
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
Tried reading about the '–add-opens=' option, but it is not mentioned in either the java man page or the 'java-h' output for my OpenJDK11 installation on Mint linux, so I have no idea what this option does, or the correct way to use it. The tutorial says "replace ALL-UNNAMED by the name of your module if it exists". I do not know what "your module" refers to. Maybe '–add-opens=' is a special switch in the Temurin (AdoptOpenJDK) you mentioned in your response?
Other than lacking an explanation of '–add-opens=', the tutorial is very helpful. Especially like the Introduction, which gives some history of java3d starting around 2008, which is after I got away from it around 2004. (In anyone is interested, I know some of its history up to 2004).
Please clarify the '–add-opens=' option, and how I am apparently misusing it.