Reply – Re: Jogl/Jogamp on Java 9
Your Name
Subject
Message
or Cancel
In Reply To
Re: Jogl/Jogamp on Java 9
— by Xerxes Rånby Xerxes Rånby
philjord wrote
  Eclipse JDT (Java Development Tools) Source Patch with Java 9 support (BETA) for Neon development stream 1.1.1.v20160606-0010_BETA_JAVA9
    java.lang.ArrayIndexOutOfBoundsException: -1
            at jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(WindowsAWTWGLGraphicsConfigurationFactory.java:171)
Obviously this will impact many people, including everyone using Java3D.

Does anyone have any thoughts on this,
To enable debug messages pass -Dnativewindow.debug.GraphicsConfiguration or set the nativewindow.debug.GraphicsConfiguration system property when launching your application.

By looking at the code it is clear that both the 1st and 2nd choice to get the windows java 9 AWT graphics configuration when using Windows have failed.
http://jogamp.org/git/?p=jogl.git;a=blob;f=src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java;h=342b4a750c59d14e19a2fa892f21de557e7acf3d;hb=HEAD#l171

To fix the bug we need to check if the way we peek into the internals of the java 9 AWT classes using Win32SunJDKReflection is still possible
http://jogamp.org/git/?p=jogl.git;a=blob;f=src/nativewindow/classes/jogamp/nativewindow/jawt/windows/Win32SunJDKReflection.java;h=40fdaa2965d8220e74d33506315a8cfdf7df7ee5;hb=HEAD

Which version of Java 9 did you use?
Since Java 9 have not been released yet it is important to make sure you try with the latest java 9 early access release or compile the lastest OpenJDK sourcecode in order to test with the latest AWT implementation.