Re: Unable to determine GraphicsConfiguration
Posted by Goofyseeker3 on Mar 01, 2024; 1:59pm
URL: https://forum.jogamp.org/Unable-to-determine-GraphicsConfiguration-tp4042444p4043339.html
possible solution (from another java library with native libraries, namely lwjgl for reference):
add also the native jars into eclipse user library list, not only the non-native libraries.
in all cases, the fat runnable jar file with the correct libraries on the zip root did not run by double clicking or from the console.
which I assume will also be solved when the native libraries are added to the class path library list, not only the non-native library list.
I assume wrong:
Exception in thread "main" com.jogamp.opengl.GLException: Unable to determine GraphicsConfiguration: WindowsWGLGraphicsConfiguration[DefaultGraphicsScreen[WindowsGraphicsDevice[type .windows, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x633a009d]], idx 0], pfdID 9, ARB-Choosen true,
requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]],
chosen GLCaps[wgl vid 9 arb: rgba 8/8/8/0, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]]
Command line:
C:\Program Files\Java\jdk-21\bin\javaw.exe "-Djava.library.path=C:\eclipse\pkg\jogl-v2.5.0-bin;C:\eclipse\pkg\jogl-v2.5.0-bin"
-Dfile.encoding=UTF-8
-Dstdout.encoding=UTF-8
-Dstderr.encoding=UTF-8
-p "C:\eclipse\pkg\jogl-v2.5.0-bin\gluegen-rt.jar;C:\eclipse\pkg\jogl-v2.5.0-bin\jogl-all.jar;C:\eclipse\pkg\jogl-v2.5.0-bin\gluegen-rt-natives-windows-amd64.jar;C:\eclipse\pkg\jogl-v2.5.0-bin\jogl-all-natives-windows-amd64.jar"
-classpath "C:\stuff\data\projects\joglrenderengine\bin"
-XX:+ShowCodeDetailsInExceptionMessages
--add-modules ALL-MODULE-PATH fi.jkauppa.joglrenderengine.JOGLRenderEngine
Adding these did not help: --add-exports java.base/java.lang=ALL-UNNAMED --add-exports java.desktop/sun.awt=ALL-UNNAMED --add-exports java.desktop/sun.java2d=ALL-UNNAMED
Final tried command line from eclipse:
C:\Program Files\Java\jdk-21\bin\javaw.exe
--add-exports java.base/java.lang=ALL-UNNAMED
--add-exports java.desktop/sun.awt=ALL-UNNAMED
--add-exports java.desktop/sun.java2d=ALL-UNNAMED "-Djava.library.path=C:\eclipse\pkg\jogl-v2.5.0-bin;C:\eclipse\pkg\jogl-v2.5.0-bin"
-Dfile.encoding=UTF-8
-Dstdout.encoding=UTF-8
-Dstderr.encoding=UTF-8
-p "C:\eclipse\pkg\jogl-v2.5.0-bin\gluegen-rt.jar;C:\eclipse\pkg\jogl-v2.5.0-bin\jogl-all.jar;C:\eclipse\pkg\jogl-v2.5.0-bin\gluegen-rt-natives-windows-amd64.jar;C:\eclipse\pkg\jogl-v2.5.0-bin\jogl-all-natives-windows-amd64.jar"
-classpath "C:\stuff\data\projects\joglrenderengine\bin"
-XX:+ShowCodeDetailsInExceptionMessages
--add-modules ALL-MODULE-PATH fi.jkauppa.joglrenderengine.JOGLRenderEngine
I see that the libraries are under -p and not under "-Djava.library.path=" tho. those were generated to command line in eclipse for lwjgl and work, and the fat runnable jar zip file works too.
No difference for the eclipse packaged runnable .jar file. Same error.
Contents of the MANIFEST.MF file (libraries/natives at the root of the jar zip file):
Manifest-Version: 1.0
Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader
Rsrc-Class-Path: ./ gluegen-rt.jar jogl-all.jar gluegen-rt-natives-windows-amd64.jar jogl-all-natives-windows-amd64.jar
Rsrc-Main-Class: fi.jkauppa.joglrenderengine.JOGLRenderEngine
Class-Path: .