Login  Register

Re: getAWTgraphicsconfiguration() causes NPE error

Posted by philjord on Nov 04, 2021; 8:03pm
URL: https://forum.jogamp.org/getAWTgraphicsconfiguration-causes-NPE-error-tp4041439p4041449.html

Mr. B.

The Illegal reflexive access isn't currently a problem, I just it was added originally to Java3D to allow new Pipelines (like JoglPipeline) to be loaded at runtime, like code injection on application servers, and it's 100% useless now, so in a future build I'll just swap it for a simple switch case.

If it's running in Eclipse then I'm still pondering unusual jar loading (sorry to harp on).

Sometimes the extension directory can be trouble could you swap your main call to this and see what it produces?

public static void main(String[] args) {
   
    String extdir = System.getProperty("java.ext.dirs");
    System.out.println(extdir);
    String[] extdirs = extdir.split(";");
    for(String eds : extdirs) {
            File ed = new File(eds);
            System.out.println("ed "+ed);
            System.out.println(""+ed.exists());
            if(ed.exists()) {
            for(File f : ed.listFiles()) {
            System.out.println(" f: "+ f.getName());
            }    
            }    
    }
   
   
    System.setProperty("sun.awt.noerasebackground", "true");
        new tuval7();
    }



For me I get:

C:\Program Files\Java\jdk1.8.0_25\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
ed C:\Program Files\Java\jdk1.8.0_25\jre\lib\ext
true
 f: access-bridge-64.jar
 f: cldrdata.jar
 f: dnsns.jar
 f: jaccess.jar
 f: jfxrt.jar
 f: localedata.jar
 f: meta-index
 f: nashorn.jar
 f: sunec.jar
 f: sunjce_provider.jar
 f: sunmscapi.jar
 f: sunpkcs11.jar
 f: zipfs.jar
ed C:\WINDOWS\Sun\Java\lib\ext
false

Thanks,
Phil.