Login  Register

Newbie Problem, Illegal Reflective Access Warning

Posted by LuminousNutria on Apr 27, 2019; 1:59am
URL: https://forum.jogamp.org/Newbie-Problem-Illegal-Reflective-Access-Warning-tp4039750.html

Hello, I'm going through a tutorial on YouTube, but the console is giving me a warning. I want to avoid any problems, and make my code run without warnings, but I'm not sure what to do. I am running JOGL on Ubuntu 18.04 and IntelliJ IDEA. I am using native jars to run JOGL, the ones recommended on the wiki page "Downloading and Installing JOGL" for 64-bit linux. This code isn't supposed to keep the window open until I manually close it.

The warning is:

/usr/lib/jvm/jdk-11/bin/java -javaagent:/home/my_name/idea-IU-183.5153.38/lib/idea_rt.jar=39027:/home/my_name/idea-IU-183.5153.38/bin -Dfile.encoding=UTF-8 -classpath /home/my_name/Desktop/My_Game/out/production/My_Game:/home/my_name/Java_Libraries/jogamp/jogl-all.jar:/home/my_name/Java_Libraries/jogamp/gluegen-rt.jar:/home/my_name/Java_Libraries/jogamp/jogl-java-src.zip:/home/my_name/Java_Libraries/jogamp/gluegen-java-src.zip:/home/my_name/Java_Libraries/jogamp/jogl-all-natives-linux-amd64.jar:/home/my_name/Java_Libraries/jogamp/gluegen-rt-natives-linux-amd64.jar Tutorial.Main
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.jogamp.common.os.NativeLibrary$3 (file:/home/my_name/Java_Libraries/jogamp/gluegen-rt.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
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 2/2, reusable (open, marked uncloseable): 0, pending (open in creation order): 2)
X11Util: Open X11 Display Connections: 2
X11Util: Open[0]: NamedX11Display[:0, 0x7f7510001a70, refCount 1, unCloseable false]
X11Util: Open[1]: NamedX11Display[:0, 0x7f7510016160, refCount 1, unCloseable false]

Process finished with exit code 0

The code I'm trying to run.

package Tutorial;

import com.jogamp.newt.opengl.GLWindow;
import com.jogamp.opengl.GLCapabilities;
import com.jogamp.opengl.GLProfile;


public class Renderer {

   private static GLWindow window = null;

   // I run this method in another file just by calling Renderer.init() in the program's main() method.
   // There is no other code in the program.
   public static void init () {

      GLProfile.initSingleton();

      GLProfile profile = GLProfile.get(GLProfile.GL2);
      GLCapabilities caps = new GLCapabilities(profile);

      window = GLWindow.create(caps);
      window.setSize(640, 360);
      window.setResizable(false);

      window.setVisible(true);
   }
}



Tutorial Link:

https://www.youtube.com/watch?v=2KmAZ48-M5c&t=11s