Login  Register

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

Posted by RickLutowski on Apr 07, 2023; 7:03pm
URL: https://forum.jogamp.org/Illegal-reflective-access-with-jogamp-java3d1-7-0-final-tp4042358p4042412.html

gouesse wrote:
> The error "SUNWprivate_1.1 not found" is fixed in JOGL 2.4.0 as far as I remember, it wasn't fixed in
> JOGL 2.3.2.

Well, I decided to start over.  Downloaded the latest version based on the Download instructions:

" JARs for Java 3D 1.7 are here." (points to jogamp-java3d1.7.1-build-20200222.7z)
"The JogAmp (JOGL, JOAL, JOCL and GlueGen) fat JAR is here." (points to jogamp-fat-all.7z)

Unpacked the jars into my classpath, then recompiled the CM Surveyor source using OpenJDK11
(openjdk version "11.0.18" 2023-01-17)

Then ran the program using the command:

java --add-opens java.desktop/sun.awt=ALL-UNNAMED \
-cp /usr/local/_jreality:\
/usr/local/_jreality/j3dcore.jar:\
/usr/local/_jreality/j3dutils.jar:\
/usr/local/_jreality/vecmath.jar:\
/usr/local/_jreality/jogamp-fat.jar \
com.jreality.surveyor.gui.$1 $2 $3


CM Surveyor worked like in the old days!

Note that running without "--add-opens java.desktop/sun.awt=ALL-UNNAMED" give the message

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jogamp.java3d.JoglPipeline$1 (file:/usr/local/_jreality/j3dcore.jar) to method sun.awt.X11GraphicsDevice.getScreen()
WARNING: Please consider reporting this to the maintainers of org.jogamp.java3d.JoglPipeline$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 1/1, reusable (open, marked uncloseable): 0, pending (open in creation order): 1)
X11Util: Open X11 Display Connections: 1
X11Util: Open[0]: NamedX11Display[:0, 0x7fd5940351f0, refCount 1, unCloseable false]

However the program still ran.

When I look into the MANIFEST.MF file for j3dcore.jar, it says:

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Built-By: phil^M
Class-Path: vecmath-1.7.1.jar gluegen-rt-2.3.2.jar jogl-all-2.3.2.jar
Created-By: Apache Maven 3.5.3
Build-Jdk: 1.8.0_25

Apparently  jogl-2.4.0 may not be needed after all on OpenJDK11 since the manifest says the latest version is using  jogl-all-2.3.2.jar, and this works.  However, if someone wanted to try things with jogl-2.4.0, where can we get it?