Jogl/Jogamp on Java 9

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Jogl/Jogamp on Java 9

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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Jogl/Jogamp on Java 9

gouessej
Administrator
Hi

There is already a bug report about AWT JOGL and Java 1.9. Which early access build of Java 1.9 do you use?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Jogl/Jogamp on Java 9

Xerxes Rånby
In reply to this post by philjord
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.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Jogl/Jogamp on Java 9

philjord
jdk-9-ea+170_windows-x64_bin.exe
on the 25/05/2017 from http://jdk.java.net/9/
I notice it's gone up to 172 now.

It's good to know you guys are looking into it.

Thanks,
Phil.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Jogl/Jogamp on Java 9

Xerxes Rånby
What I will do is to forward this issue to Rory O'Donnell who manage the OpenJDK quality outreach
https://wiki.openjdk.java.net/display/quality/Quality+Outreach
The quality outreach is one of the best channels to use to report issues when OpenJDK changes breaks FOSS projects.

Cheers
Xerxes

2017-06-02 3:29 GMT+02:00 philjord [via jogamp] <[hidden email]>:
jdk-9-ea+170_windows-x64_bin.exe
on the 25/05/2017 from http://jdk.java.net/9/
I notice it's gone up to 172 now.

It's good to know you guys are looking into it.

Thanks,
Phil.


If you reply to this email, your message will be added to the discussion below:
http://forum.jogamp.org/Jogl-Jogamp-on-Java-9-tp4038012p4038025.html
To start a new topic under jogl, email [hidden email]
To unsubscribe from jogamp, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Jogl/Jogamp on Java 9

Xerxes Rånby
In reply to this post by philjord
Can someone test if the JDK 9 EA 170 runtime option
--permit-illegal-access
will allow JOGL to get the graphic context from AWT.
This runtime option was mentioned in the EA 170 release notes:
If this allow Jogl to access AWT internals and Java3D to run then we have a workaround at least for JDK 9 however we need to address it properly before JDK 10


2017-06-02 9:59 GMT+02:00 Xerxes Rånby <[hidden email]>:
What I will do is to forward this issue to Rory O'Donnell who manage the OpenJDK quality outreach
https://wiki.openjdk.java.net/display/quality/Quality+Outreach
The quality outreach is one of the best channels to use to report issues when OpenJDK changes breaks FOSS projects.

Cheers
Xerxes


2017-06-02 3:29 GMT+02:00 philjord [via jogamp] <[hidden email]>:
jdk-9-ea+170_windows-x64_bin.exe
on the 25/05/2017 from http://jdk.java.net/9/
I notice it's gone up to 172 now.

It's good to know you guys are looking into it.

Thanks,
Phil.


If you reply to this email, your message will be added to the discussion below:
http://forum.jogamp.org/Jogl-Jogamp-on-Java-9-tp4038012p4038025.html
To start a new topic under jogl, email [hidden email]
To unsubscribe from jogamp, click here.
NAML


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Jogl/Jogamp on Java 9

gouessej
Administrator
I'll give it a try.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Jogl/Jogamp on Java 9

gouessej
Administrator
In reply to this post by Xerxes Rånby
Loading...