I've done a lot of googling and I've seen this has been posted a ton, but following each thread and trying each workaround/fix that's been listed hasn't really worked for me.
This is my first post and I'm not sure if I'm breaking any community guidelines by posting this, so please bear with me. Right now I'm trying to run an old program that *was* working, but upon revisiting it has somehow magically decided not to work anymore. My system is: Processor: Intel i7-8700 3.20GHz RAM: 32.0GB Edition: Windows 10 Home (V. 22H2) Graphics Card: NVIDIA GeForce GTX 1060 3GB My PATH is: C:\Program Files\Zulu\zulu-11\bin\ C:\Program Files\Zulu\zulu-18\bin\ C:\Program Files (x86)\Razer Chroma SDK\bin C:\Program Files\Razer Chroma SDK\bin C:\Program Files (x86)\Razer\ChromaBroadcast\bin C:\Program Files\Razer\ChromaBroadcast\bin C:\Program Files\Common Files\Oracle\Java\javapath C:\Windows\system32 C:\Windows C:\Windows\System32\Wbem C:\Windows\System32\WindowsPowerShell\v1.0\ C:\Windows\System32\OpenSSH\ C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common D:\Git\cmd My IDE is: VS Code (using RedHat for Java) Java Version: C:\Program Files\Zulu\zulu-18 launch.json: { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "type": "java", "name": "Code", "request": "launch", "mainClass": "a2.Code", "projectName": "Assignment 2_a05f56dc" }, { "type": "java", "name": "Code", "request": "launch", "mainClass": "a2.Code", "projectName": "Assignment 2_4d0a9515" }, { "type": "java", "name": "Current File", "request": "launch", "mainClass": "${file}" }, { "type": "java", "name": "Code", "request": "launch", "mainClass": "a2.Code", "projectName": "Assignment 2_5fced8d", "args": "-Dsun.java2d.d3d=false -Dsun.java2d.uiScale=1" } ] } My File structure is: ...hard to type out, so let me get back to you on this. My Error is: 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 0x7acd9cd4]], 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[.]]] at jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(WindowsAWTWGLGraphicsConfigurationFactory.java:182) at com.jogamp.nativewindow.GraphicsConfigurationFactory.chooseGraphicsConfiguration(GraphicsConfigurationFactory.java:424) at com.jogamp.opengl.awt.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:1513) at com.jogamp.opengl.awt.GLCanvas.addNotify(GLCanvas.java:609) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4846) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4846) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4846) at java.desktop/javax.swing.JRootPane.addNotify(JRootPane.java:721) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/java.awt.Window.addNotify(Window.java:791) at java.desktop/java.awt.Frame.addNotify(Frame.java:495) at java.desktop/java.awt.Window.show(Window.java:1053) at java.desktop/java.awt.Component.show(Component.java:1729) at java.desktop/java.awt.Component.setVisible(Component.java:1676) at java.desktop/java.awt.Window.setVisible(Window.java:1036) at a2.Code.<init>(Code.java:144) at a2.Code.main(Code.java:1008) |
Administrator
|
This looks a bit adventurous, two different Azul JVMs, no?
assuming you use the 18 and hence OpenJDK-17 compatible somehow, you may pass: --add-opens java.desktop/sun.awt=ALL-UNNAMED --add-opens java.desktop/sun.java2d=ALL-UNNAMED to the JVM. At least this is how JOGL performs unit tests using OpenJDK-17 (and OpenJDK 11). |
Unfortunately that didn't work :/
What's the problem with having multiple JDKs installed? Here's what I got back when trying it: PS C:\*****personal info*****> & 'C:\Program Files\Zulu\zulu-18\bin\java.exe' '-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:56239' '@C:\Users\****\AppData\Local\Temp\cp_we10s6nycnbobjdls8e0xn8f.argfile' 'a2.Code' 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 0x7c10ea2a]], 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[.]]] at jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(WindowsAWTWGLGraphics at com.jogamp.opengl.awt.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:1513) at com.jogamp.opengl.awt.GLCanvas.addNotify(GLCanvas.java:609) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4846) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4846) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4846) at java.desktop/javax.swing.JRootPane.addNotify(JRootPane.java:721) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/java.awt.Window.addNotify(Window.java:791) at java.desktop/java.awt.Frame.addNotify(Frame.java:495) at java.desktop/java.awt.Window.show(Window.java:1053) at java.desktop/java.awt.Component.show(Component.java:1729) at java.desktop/java.awt.Component.setVisible(Component.java:1676) at java.desktop/java.awt.Window.setVisible(Window.java:1036) at a2.Code.<init>(Code.java:144) at a2.Code.main(Code.java:1008) PS C:\Users\****> c:; cd 'c:\Users\****'; & 'C:\Program Files\Zulu\zulu-18\bin\java.exe' '-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:56313' '@C:\Users\****\AppData\Local\Temp\cp_we10s6nycnbobjdls8e0xn8f.argfile' 'a2.Code' '--add-opens' 'java.desktop/sun.awt=ALL-UNNAMED' '--add-opens' 'java.desktop/sun.java2d=ALL-UNNAMED' 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 0x1e029be2]], 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[.]], at jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(WindowsAWTWGLGraphicsConfigurationFactory.java:182) at com.jogamp.nativewindow.GraphicsConfigurationFactory.chooseGraphicsConfiguration(GraphicsConfigurationFactory.java:424) at com.jogamp.opengl.awt.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:1513) at com.jogamp.opengl.awt.GLCanvas.addNotify(GLCanvas.java:609) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4846) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4846) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4846) at java.desktop/javax.swing.JRootPane.addNotify(JRootPane.java:721) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/java.awt.Window.addNotify(Window.java:791) at java.desktop/java.awt.Frame.addNotify(Frame.java:495) at java.desktop/java.awt.Window.show(Window.java:1053) at java.desktop/java.awt.Component.show(Component.java:1729) at java.desktop/java.awt.Component.setVisible(Component.java:1676) at java.desktop/java.awt.Window.setVisible(Window.java:1036) at a2.Code.<init>(Code.java:144) at a2.Code.main(Code.java:1008) PS C:\Users\****\OneDrive\***> c:; cd 'c:\Users\****\OneDrive\****'; & 'C:\Program Files\Zulu\zulu-18\bin\java.exe' '-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:56430' '@C:\Users\****\AppData\Local\Temp\cp_we10s6nycnbobjdls8e0xn8f.argfile' 'a2.Code' '--add-opens' 'java.desktop/sun.awt=ALL-UNNAMED' '--add-opens' 'java.desktop/sun.java2d=ALL-UNNAMED' Exception in thread "main" com.jogamp.opengl.GLException: Unable to determine GraphicsConfiguration: WindowsWGLGraphicsConfiguration[DefaultGraphicsScreen[WindowsGraphicsDevice[type .windoPS C:\Users\****\OneDrive ****> c:; cd 'c:\Users\****\OneDrive****\'; & 'C:\Program Files\Zulu\zulu-18\bin\java.exe' '-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:56461' '@C:\Users\****\AppData\Local\Temp\cp_we10s6nycnbobjdls8e0xn8f.argfile' 'a2.Code' '--add-opens' 'java.desktop/sun.awt=ALL-UNNAMED' '--add-opens' 'java.desktop/sun.java2d=ALL-UNNAMED' Exception in thread "main" com.jogamp.opengl.GLException: Unable to determine GraphicsConfiguration: WindowsWGLGraphicsConfiguration[DefaultGraphicsScreen[WindowsGraphicsDevice[type .windoPS C:\Users\****\OneDrive - California State University, Sacramento\Spring 2023\CSC 155\Assignments\Assignment 2> c:; cd 'c:\Users\****\OneDrive - California State University, Sacramento\Spring 2023\CSC 155\Assignments\Assignment 2'; & 'C:\Program Files\Zulu\zulu-18\bin\java.exe' '-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:56517' '@C:\Users\****\AppData\Local\Temp\cp_we10s6nycnbobjdls8e0xn8f.argfile' 'a2.Code' '-Dsun.java2d.d3d=false' '-Dsun.java2d.uiScale=1' 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 0x7c10ea2a]], 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[.]]] at jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(WindowsAWTWGLGraphicsConfigurationFactory.java:182) at com.jogamp.nativewindow.GraphicsConfigurationFactory.chooseGraphicsConfiguration(GraphicsConfigurationFactory.java:424) at com.jogamp.opengl.awt.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:1513) at com.jogamp.opengl.awt.GLCanvas.addNotify(GLCanvas.java:609) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4846) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4846) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4846) at java.desktop/javax.swing.JRootPane.addNotify(JRootPane.java:721) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/java.awt.Window.addNotify(Window.java:791) at java.desktop/java.awt.Frame.addNotify(Frame.java:495) at java.desktop/java.awt.Window.show(Window.java:1053) at java.desktop/java.awt.Component.show(Component.java:1729) at java.desktop/java.awt.Component.setVisible(Component.java:1676) at java.desktop/java.awt.Window.setVisible(Window.java:1036) at a2.Code.<init>(Code.java:144) at a2.Code.main(Code.java:1008) |
Administrator
|
So I assume you run OpenJDK >= 11 && <= 17?
Then perhaps add: --illegal-access=warn Edit: I see you used Azul's version 18 (zulu, OpenJDK compatible). Hmm .. last time I tried with their product on GNU/Linux I had no issues. Below is JOGL's make/build-test.xml handling these things.
|
isn't .xml a maven thing? Or is there a way to use it with a non-maven build?
|
Administrator
|
This post was updated on .
Hello
At first, please can you confirm that you use the very latest version of JOGL, i.e JOGL 2.4.0? If not, please use it as it contains at least two bug fixes that might help in your case for sure. Sven quoted a part of an Ant script. Yes of course, you can use those flags in command line too. I've looked at your command line, I don't see your classpath. I hope that you don't put the JARs into the JDK, it's a very bad practice. Please try to solve your problem outside your IDE as a first step and inside your IDE as a second step in order to separate the root causes that don't depend on your IDE and those that depend on it. By the way, Visual Studio Code has several known limitations and bugs that affect Java projects using neither Maven nor Gradle, it's not the best choice for Java programming for sure, I had similar issues with Eclipse Theia. By the way, I have to use a different syntax in some IDEs: --add-opens=java.desktop/sun.awt=ALL-UNNAMED Note the first equal. If the problem persists, I can try with Eclipse Theia as the settings are more or less the same as Visual Studio Code and VS Codium. Please can you provide a reproducer?
Julien Gouesse | Personal blog | Website
|
I'm at school all day today, but let me get back to you when I get back home and can send screenshots 'n such. I have a feeling it might be either A) my java installation/version or B) how i've included jogl/joml in my project.
Today I was able to open and properly run the project on my M1 macbook, so the code itself is working fine, and the project runs. I haven't tried the towers in the school lab, but I'm pretty sure they will run it fine too. There are discrepancies between my VS Code setup on my laptop and my setup on my home tower - the most notable I've seen is that my laptop has the project running in Zulu 11, but my tower is stuck trying to run it in Zulu 18 - which... doesn't make much sense that a later version would behave worse, but there might've been some updates in the 7 version difference that requires some extra steps. I also have slightly different plugins and setting between my VS Code setups - which... admittedly is bad practice to not have a uniform setup between my development platforms. That might be causing some issues too. As far as the Ant script, this is new territory for me, so bear with me. I'm used to working with much simpler Java projects which don't require anything past making sure the main() function contains no errors and I have a working finger to hit the 'Run' command with. I can try passing the updated argument "--add-opens=java.desktop/sun.awt=ALL-UNNAMED" when I get home. Also: a reproducer? First time hearing that term. Some sort of program/construct/app that reproduces errors? |
Administrator
|
You can use this simple test:
https://jogamp.org/wiki/index.php/Rudimentary_standalone_example_using_the_fixed_pipeline_by_Julien_Gouesse Please enter "java -version" before running this program to know which JDK you use. Sorry to repeat that but it's very important, use JOGL 2.4.0. For the --add-opens clause, yes, test with one equal sign and with 2. I have already succeeded in running JOGL under similar configurations. Don't forget to tell me what your classpath is.
Julien Gouesse | Personal blog | Website
|
Administrator
|
In reply to this post by DeCiBelZerg
By the way, you mustn't put several versions of Java into your PATH environment variable, only one at a time. Please fix it.
Use JOGL 2.4.0, take this fat JAR. This should work: Save JOGLQuad.java into the "src" directory. Run C:\Program Files\Zulu\zulu-18\bin\javac.exe -d bin -cp jogamp-fat.jar src/JOGLQuad.java Run C:\Program Files\Zulu\zulu-18\bin\java.exe --add-opens java.desktop/sun.awt=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -cp bin;jogamp-fat.jar JOGLQuad
Julien Gouesse | Personal blog | Website
|
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
|
Ok figured it out, and it was the first response, but for others who come along behind me and have the same problem and aren't well versed in diving into VS code's settings here's what worked:
This text: --add-exports java.base/java.lang=ALL-UNNAMED --add-exports java.desktop/sun.awt=ALL-UNNAMED --add-exports java.desktop/sun.java2d=ALL-UNNAMED gets pasted here: ![]() Which can be reached by doing this: 1. the following hotkey = ( ctrl + shift + P on windows ) (option + shift + P on mac ) 2. type in "settings" ![]() And typing "java" when it asks for languages ![]() Then clear out the search bar and type "jvm" and it should be right there ![]() You should be able to ctrl+V it in there without needing any fancy formatting, and with any luck it works for you like it did for me. (Also make sure your JDK installation is good; another step I took is to uninstall the JDK I was using and install a different version from a different source) |
Administrator
|
Thank you for the feedback. By the way, I still consider that having multiple JDKs exposed in the PATH environment variable is a very bad idea.
Julien Gouesse | Personal blog | Website
|
Free forum by Nabble | Edit this page |