Re: Unable to determine GraphicsConfiguration
Posted by Goofyseeker3 on Mar 14, 2024; 2:47pm
URL: https://forum.jogamp.org/Unable-to-determine-GraphicsConfiguration-tp4042444p4043407.html
it might be about the jar-in-jar loader in linux with jogamp.
I extracted the swing rudimentary example jar into a directory and run this command and it works:
java --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.desktop/sun.java2d=ALL-UNNAMED --add-opens java.desktop/sun.awt=ALL-UNNAMED -cp jogamp-fat.jar:. fi.jkauppa.joglrenderengine.JOGLRenderEngine
this command works too for the swing rudimentary example (no additional launch arguments required):
java -cp jogamp-fat.jar:. fi.jkauppa.joglrenderengine.JOGLRenderEngine
what it if works from .jar without using the jar-in-jar loader.
I tried to make a normal jar without the separate loader, but I cant seem to get the jogamp-fat.jar to load from the jar class-path.
jar files in jar files requires a separate class loader by java specification.
command used to run the basic jar without jar-in-jar loader (does not work):
java -jar joglrenderengine.jar
I'll report eclipse jar-in-jar loader seg fault in linux in eclipse forums.
edit: I setup eclipse for Java IDE in linux and jogamp-fat runs without any arguments from the IDE for the swing-one rudimentary example.
now only the runnable .jar does not work. only if you extract the .jar and run it without "java -jar myapp.jar".
edit: even the rudimentary example using awt runs in linux Eclipse IDE for Java without any arguments using jogamp-fat.jar.
working command line from linux eclipse IDE for Java (using default awt code):
/usr/lib/jvm/java-21-openjdk-amd64/bin/java
-Dfile.encoding=UTF-8
-Dstdout.encoding=UTF-8
-Dstderr.encoding=UTF-8
-classpath /home/tpalomaki/workspace/joglrenderengine/bin:/home/tpalomaki/workspace/pkg/jogl/jogamp-fat.jar
-XX:+ShowCodeDetailsInExceptionMessages fi.jkauppa.joglrenderengine.RudimentaryTest
on my current work IDE environments only windows awt requires additional launch arguments, not swing, not linux.