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.htmlI 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.