Unable to determine GraphicsConfiguration - Java 17 - JOGL 2.5.0 - Eclipse RCP App

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Unable to determine GraphicsConfiguration - Java 17 - JOGL 2.5.0 - Eclipse RCP App

TomasCvincek
Hi All,

I am facing com.jogamp.opengl.GLException: Unable to determine GraphicsConfiguration problem. I searched for solutions and I found some even on this forum - https://github.com/jzy3d/jogl/issues/4, https://forum.jogamp.org/Unable-to-determine-Graphics-Configuration-Am-I-setting-up-something-wrong-td4041606.html

I found following solution (workaround) - add 3 JVM parameters:
  --add-exports java.base/java.lang=ALL-UNNAMED
  --add-exports java.desktop/sun.awt=ALL-UNNAMED
  --add-exports java.desktop/sun.java2d=ALL-UNNAMED

I tried this and it worked just fine when I launched my application from Eclipse IDE (in Debug mode). When running it from IDE, there is no exception and everything seems to be working as expected. But when I run it from build - runtime application, exception is still there, no matter if I pass those parameters to it or not.

I tried to print all VM arguments from eclipse:
[-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:59220, -Dosgi.requiredJavaVersion=17, -Xms256m, -Xmx4g, -Djava.library.path=C:\lite3d_repos\zdrojaky_linux-afterconfig\litebox3d\win_b64\code\bin;C:\lite3d_repos\zdrojaky_linux-afterconfig\litebox3d\win_b64\code\bin\plugins;C:\lite3d_repos\zdrojaky_linux-afterconfig\litebox3d\java, -DTCA_PROJECT_VARRAY=1, -DTCA_PROJECT_SUFFIX=, -DTCA_PROJECT_DEBUG=, -DTCA_DRY_RUN=, -Dsun.java2d.noddraw=true, -Dsun.java2d.uiScale=1, --add-exports=java.base/java.lang=ALL-UNNAMED, --add-exports=java.desktop/sun.awt=ALL-UNNAMED, --add-exports=java.desktop/sun.java2d=ALL-UNNAMED, --add-modules=ALL-SYSTEM, -Dfile.encoding=Cp1250].

And I also tried to print all VM arguments from runtime build:
[-Xms40m, -Xmx4g, -DTCA_PROJECT_VARRAY=1, -DTCA_PROJECT_SUFFIX=, -Dsun.java2d.noddraw=true, -Dsun.java2d.uiScale=1, --add-exports java.base/java.lang=ALL-UNNAMED, --add-exports java.desktop/sun.awt=ALL-UNNAMED, --add-exports java.desktop/sun.java2d=ALL-UNNAMED].

We build our application using SCons but not sure, if that is important. On Java 11, everything is fine. Java 17 update is necesarry for us because of the other tool, where we integrate our solution.

Does anyone have any idea, why it behaves like this? Are there any differences for JOGL libs when they are run from debug and from release? Are there any other workarounds for this?

I guess this might be more question for Eclipse RCP forum and I am planning to share it there as well but in case you have any idea how to overcome this, it would be very appreciated. I can provide more information if requested.

Thanks
Tomas C.

Reply | Threaded
Open this post in threaded view
|

Re: Unable to determine GraphicsConfiguration - Java 17 - JOGL 2.5.0 - Eclipse RCP App

gouessej
Administrator
Hello

I suspect the problem has nothing to do with JOGL. There are two possible root causes:
- Shouldn't you use --add-opens?
- There are two syntaxes but in some cases, only one of them works:
     --add-opens=java.base/java.nio=ALL-UNNAMED
     --add-opens  java.base/java.nio=ALL-UNNAMED

I advise you to reproduce your problem on a tiny example if it persists.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Unable to determine GraphicsConfiguration - Java 17 - JOGL 2.5.0 - Eclipse RCP App

TomasCvincek
Hello Julien,

thank you very much - it worked.
I used:
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.desktop/sun.awt=ALL-UNNAMED
--add-opens=java.desktop/sun.java2d=ALL-UNNAMED

and it works from release just fine.

Thank you a lot. :)
Reply | Threaded
Open this post in threaded view
|

Re: Unable to determine GraphicsConfiguration - Java 17 - JOGL 2.5.0 - Eclipse RCP App

gouessej
Administrator
You're welcome, thank you for the feedback.
Julien Gouesse | Personal blog | Website