Login  Register

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

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

gouesse wrote:
> In some situations, you have to omit the first equal sign and in some others, you must use it:
> -add-opens java.desktop/sun.awt=ALL-UNNAMED
> or
> -add-opens=java.desktop/sun.awt=ALL-UNNAMED

1. Omitting the = sign after --add-opens gives:

$ 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 <main_classname>

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.jogamp.common.os.NativeLibrary$3 (file:/usr/local/_jreality/jogamp-fat.jar) to method java.lang.ClassLoader.findLibrary(java.lang.String)
WARNING: Please consider reporting this to the maintainers of com.jogamp.common.os.NativeLibrary$3
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
Inconsistency detected by ld.so: dl-lookup.c: 111: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!


2. Including the = sign after --add-opens= gives:

$ 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
<main_classname>

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.jogamp.common.os.NativeLibrary$3 (file:/usr/local/_jreality/jogamp-fat.jar) to method java.lang.ClassLoader.findLibrary(java.lang.String)
WARNING: Please consider reporting this to the maintainers of com.jogamp.common.os.NativeLibrary$3
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
Inconsistency detected by ld.so: dl-lookup.c: 111: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!

3. $ java -version
openjdk version "11.0.18" 2023-01-17
OpenJDK Runtime Environment (build 11.0.18+10-post-Ubuntu-0ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.18+10-post-Ubuntu-0ubuntu118.04.1, mixed mode, sharing)


4. The above two examples differ from those in my previous posts in that I ordered to java3d jars in the -cp exactly as you had them in one of your previous posts, including adding j3dutils.jar just in case that made any difference even though my program doesn't use it.  The ordering made no difference.  (I know it shouldn't, but ...)

This is proving to be a pernicious problem, at least on my system.

More observations and comments on my next post.  At this time I just want to say I very much appreciate the attention you are giving to this problem.  If anyone volunteers to try out CM Creator (github.com/rlutowski/CMCreator) and runs into any problems, I will strive to be as responsive to them as you are to me.