Reply – Jogl/Jogamp on Java 9
Your Name
Subject
Message
or Cancel
In Reply To
Jogl/Jogamp on Java 9
— by philjord philjord
Hi,
I thought I might open the subject of Java 9 support from Jogamp/Jogl

I've run 2 incredibly basic tests, one works one fails. I ran it under Eclipse Oxygen, with:
  Eclipse JDT (Java Development Tools) Patch with Java 9 support (BETA) for Neon development stream 1.1.1.v20160606-0010_BETA_JAVA9
  Eclipse JDT (Java Development Tools) Source Patch with Java 9 support (BETA) for Neon development stream 1.1.1.v20160606-0010_BETA_JAVA9

Under a very basic system, that simply instantiates a GLWindow with everything default, Jogl works correctly for a trivial colored cube test.
So this code runs correctly:
            pro = GLProfile.get(null);
            cap = new GLCapabilities(pro);
            cap.setHardwareAccelerated(true);
            cap.setDepthBits(24);
            cap.setStencilBits(8);
            cap.setSampleBuffers(true);
            cap.setNumSamples(2);
            this.glwindow = GLWindow.create(cap);
            if (fullscreen)
                    this.glwindow.setFullscreen(true);
            else
                    this.glwindow.setSize(10, 10);

            this.glwindow.setTitle("GLWindow Canvas3D");
            this.glwindow.setVisible(true);
However when trying to use GraphicsConfigurationFactory.chooseGraphicsConfiguration it throws this error:
    java.lang.ArrayIndexOutOfBoundsException: -1
            at jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(WindowsAWTWGLGraphicsConfigurationFactory.java:171)
            at com.jogamp.nativewindow.GraphicsConfigurationFactory.chooseGraphicsConfiguration(GraphicsConfigurationFactory.java:424)
            at org.jogamp.java3d.Jogl2es2Pipeline.createAwtGraphicsConfiguration(Jogl2es2Pipeline.java:9724)
            at org.jogamp.java3d.Jogl2es2Pipeline.getBestConfiguration(Jogl2es2Pipeline.java:9472)
            at org.jogamp.java3d.Renderer.doWork(Renderer.java:496)
            at org.jogamp.java3d.J3dThread.run(J3dThread.java:271)
Obviously this will impact many people, including everyone using Java3D.

Does anyone have any thoughts on this, is this already known and under way?

Thanks,
Phil.