Login  Register

Re: getAWTgraphicsconfiguration() causes NPE error

Posted by Oskarnaugh on Apr 07, 2022; 5:32am
URL: https://forum.jogamp.org/getAWTgraphicsconfiguration-causes-NPE-error-tp4041439p4041711.html

Hi

I took a look at the --add-opens VM-options and managed to make all warnings disappear.
It was necessary to add both options:
--add-opens java.desktop/sun.awt=ALL-UNNAMED
--add-opens java.desktop/sun.java2d.opengl=ALL-UNNAMED

Maybe more options are needed for other things but they seem to work as intended.


To add them in IntelliJ:
1. Open 'Edit Run/Debug configurations' dialog
2. VM options are hidden by default. To add them press "Alt+V" or select "Modify Options -> Add VM Options"
3. Finally write the necessary VM-options sepparated by a space

And that's it! One can totally use Java3D versions 1.6 and 1.7 with the latest JDK version (I also tested version 18). Thank you very much for your support and your time.