Reply – Re: Jogl/Jogamp on Java 9 no compatible graphics context
Your Name
Subject
Message
or Cancel
In Reply To
Re: Jogl/Jogamp on Java 9 no compatible graphics context
— by Douglas Lyon Douglas Lyon
Hi All,
It seems that there is only one GraphicsConfiguration available, and it is NOT compatible with Canvas3D on a mac...check it out:
   public static void main(String[] args) {
        final GraphicsEnvironment localGraphicsEnvironment = getLocalGraphicsEnvironment();
        final GraphicsDevice defaultScreenDevice = localGraphicsEnvironment.getDefaultScreenDevice();
        GraphicsConfiguration c[] = defaultScreenDevice.getConfigurations();
        for (int i = 0; i < c.length; i++) {
            System.out.println("gc:" + i + ":" + c[i]);
        }
        gc = c[0];
        c3d = new Canvas3D(gc);
    }
---> Outputs:
/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home/bin/java -Xmx1024m -Dsun.java2d.d3d=false -Dsun.java2d.noddraw=true -Dsun.java2d.ddoffscreen=true -Dsun.java2d.ddscale=true -Dj3d.debug=true -Dj3d.implicitAntialiasing=false -Dj3d.d3ddevice=emulation -Dj3d.fullscreen=true -Dfile.encoding=UTF-8 -classpath /Users/lyon/current/java/j4p/out/production/j4p:/Users/lyon/current/java/j4p/jars/anna-3.5.jar:/Users/lyon/current/java/j4p/jars/annotations.jar:/Users/lyon/current/java/j4p/jars/ant.jar:/Users/lyon/current/java/j4p/jars/ant-launcher-1.7.1.jar:/Users/lyon/current/java/j4p/jars/antlr-4.5-complete.jar:/Users/lyon/current/java/j4p/jars/apache-mime4j.jar:/Users/lyon/current/java/j4p/jars/asm-2.2.1.jar:/Users/lyon/current/java/j4p/jars/asm-attrs-2.2.1.jar:/Users/lyon/current/java/j4p/jars/batik-anim.jar:/Users/lyon/current/java/j4p/jars/batik-awt-util.jar:/Users/lyon/current/java/j4p/jars/batik-bridge.jar:/Users/lyon/current/java/j4p/jars/batik-codec.jar:/Users/lyon/current/java/j4p/jars/batik-css.jar:/Users/lyon/current/java/j4p/jars/batik-dom.jar:/Users/lyon/current/java/j4p/jars/batik-ext.jar:/Users/lyon/current/java/j4p/jars/batik-extension.jar:/Users/lyon/current/java/j4p/jars/batik-gui-util.jar:/Users/lyon/current/java/j4p/jars/batik-gvt.jar:/Users/lyon/current/java/j4p/jars/batik-parser.jar:/Users/lyon/current/java/j4p/jars/batik-rasterizer.jar:/Users/lyon/current/java/j4p/jars/batik-script.jar:/Users/lyon/current/java/j4p/jars/batik-slideshow.jar:/Users/lyon/current/java/j4p/jars/batik-squiggle.jar:/Users/lyon/current/java/j4p/jars/batik-svg-dom.jar:/Users/lyon/current/java/j4p/jars/batik-svggen.jar:/Users/lyon/current/java/j4p/jars/batik-svgpp.jar:/Users/lyon/current/java/j4p/jars/batik-swing.jar:/Users/lyon/current/java/j4p/jars/batik-transcoder.jar:/Users/lyon/current/java/j4p/jars/batik-ttf2svg.jar:/Users/lyon/current/java/j4p/jars/batik-util.jar:/Users/lyon/current/java/j4p/jars/batik-xml.jar:/Users/lyon/current/java/j4p/jars/bcel-6.0.jar:/Users/lyon/current/java/j4p/jars/bcprov-jdk15on-154.jar:/Users/lyon/current/java/j4p/jars/bridj-0.6.1.jar:/Users/lyon/current/java/j4p/jars/catalina.jar:/Users/lyon/current/java/j4p/jars/cglib-2.2_beta1.jar:/Users/lyon/current/java/j4p/jars/client-combined-3.4.0-nodeps.jar:/Users/lyon/current/java/j4p/jars/cmu_time_awb.jar:/Users/lyon/current/java/j4p/jars/cmu_us_kal.jar:/Users/lyon/current/java/j4p/jars/cmudict04.jar:/Users/lyon/current/java/j4p/jars/cmulex.jar:/Users/lyon/current/java/j4p/jars/cmutimelex.jar:/Users/lyon/current/java/j4p/jars/com.ibm.icu_50.1.1.v201304230130.jar:/Users/lyon/current/java/j4p/jars/commons-beanutils-1.9.2.jar:/Users/lyon/current/java/j4p/jars/commons-codec-1.4.jar:/Users/lyon/current/java/j4p/jars/commons-collections4-4.1.jar:/Users/lyon/current/java/j4p/jars/commons-csv-1.4.jar:/Users/lyon/current/java/j4p/jars/commons-httpclient-3.0-rc3.jar:/Users/lyon/current/java/j4p/jars/commons-io-2.0.1.jar:/Users/lyon/current/java/j4p/jars/commons-lang3-3.5.jar:/Users/lyon/current/java/j4p/jars/commons-logging-1.2.jar:/Users/lyon/current/java/j4p/jars/commons-net-1.4.1.jar:/Users/lyon/current/java/j4p/jars/coreProcessing.jar:/Users/lyon/current/java/j4p/jars/cssparser-0.9.5.jar:/Users/lyon/current/java/j4p/jars/dicom.jar:/Users/lyon/current/java/j4p/jars/dom4j-1.6.1.jar:/Users/lyon/current/java/j4p/jars/dropbox-core-sdk-1.7.7.jar:/Users/lyon/current/java/j4p/jars/dropbox-java-sdk-1.3.jar:/Users/lyon/current/java/j4p/jars/Echo2_App.jar:/Users/lyon/current/java/j4p/jars/ehcache-1.2.3.jar:/Users/lyon/current/java/j4p/jars/en_us.jar:/Users/lyon/current/java/j4p/jars/ezmorph-1.0.6.jar:/Users/lyon/current/java/j4p/jars/facialrecognition.jar:/Users/lyon/current/java/j4p/jars/filters-2.0.235.jar:/Users/lyon/current/java/j4p/jars/freeBase.jar:/Users/lyon/current/java/j4p/jars/freeGraphics.jar:/Users/lyon/current/java/j4p/jars/freehepEmf17.jar:/Users/lyon/current/java/j4p/jars/freeHepGraphicsIO17.jar:/Users/lyon/current/java/j4p/jars/freemarker.jar:/Users/lyon/current/java/j4p/jars/freetts.jar:/Users/lyon/current/java/j4p/jars/gson-2.8.0.jar:/Users/lyon/current/java/j4p/jars/HelloWorld.jar:/Users/lyon/current/java/j4p/jars/hibernate-3.2.2.ga.jar:/Users/lyon/current/java/j4p/jars/hsqldb-1.7.3.3.jar:/Users/lyon/current/java/j4p/jars/htmlunit-2.26.jar:/Users/lyon/current/java/j4p/jars/htmlunit-core-js-2.9.jar:/Users/lyon/current/java/j4p/jars/htmlunit-core-js-2.26.jar:/Users/lyon/current/java/j4p/jars/httpclient-4.1.2.jar:/Users/lyon/current/java/j4p/jars/httpclient-4.5.3.jar:/Users/lyon/current/java/j4p/jars/httpcore-4.1.2.jar:/Users/lyon/current/java/j4p/jars/httpcore-4.4.6.jar:/Users/lyon/current/java/j4p/jars/httpcore-nio-4.0.jar:/Users/lyon/current/java/j4p/jars/httpmime-4.1.2.jar:/Users/lyon/current/java/j4p/jars/httpmime-4.5.3.jar:/Users/lyon/current/java/j4p/jars/hyperjaxb2-core-0.6.2.jar:/Users/lyon/current/java/j4p/jars/hyperjaxb2-hibernate-configuration-0.6.2.jar:/Users/lyon/current/java/j4p/jars/hyperjaxb2-hibernate-customizations-0.6.2.jar:/Users/lyon/current/java/j4p/jars/hyperjaxb2-hibernate-mapping-0.6.2.jar:/Users/lyon/current/java/j4p/jars/hyperjaxb2-shared-0.6.2.jar:/Users/lyon/current/java/j4p/jars/hyperjaxb2-testing-0.6.2.jar:/Users/lyon/current/java/j4p/jars/imagej-1.47.jar:/Users/lyon/current/java/j4p/jars/imloader.jar:/Users/lyon/current/java/j4p/jars/itext-1.3.jar:/Users/lyon/current/java/j4p/jars/jaas.jar:/Users/lyon/current/java/j4p/jars/jackson-core-2.2.4.jar:/Users/lyon/current/java/j4p/jars/jai_codec.jar:/Users/lyon/current/java/j4p/jars/jai_core.jar:/Users/lyon/current/java/j4p/jars/jaranalyzer.jar:/Users/lyon/current/java/j4p/jars/jaxb1-impl.jar:/Users/lyon/current/java/j4p/jars/jaxb-api.jar:/Users/lyon/current/java/j4p/jars/jaxbcommons-core-1.0.3.jar:/Users/lyon/current/java/j4p/jars/jaxbcommons-shared-1.0.3.jar:/Users/lyon/current/java/j4p/jars/jaxbcommons-testing-1.0.3.jar:/Users/lyon/current/java/j4p/jars/jbrowserdriver-0.17.4.jar:/Users/lyon/current/java/j4p/jars/jce.jar:/Users/lyon/current/java/j4p/jars/jetty-client-9.4.3.v20170317.jar:/Users/lyon/current/java/j4p/jars/jetty-http-9.4.3.v20170317.jar:/Users/lyon/current/java/j4p/jars/jetty-io-9.4.3.v20170317.jar:/Users/lyon/current/java/j4p/jars/jetty-util-9.4.3.v20170317.jar:/Users/lyon/current/java/j4p/jars/jimi.jar:/Users/lyon/current/java/j4p/jars/jmf.jar:/Users/lyon/current/java/j4p/jars/jna.jar:/Users/lyon/current/java/j4p/jars/js.jar:/Users/lyon/current/java/j4p/jars/jsch.jar:/Users/lyon/current/java/j4p/jars/json-jena-1.0.jar:/Users/lyon/current/java/j4p/jars/json-lib-2.4-jdk15.jar:/Users/lyon/current/java/j4p/jars/json_simple-1.1.jar:/Users/lyon/current/java/j4p/jars/jsoup-1.8.1.jar:/Users/lyon/current/java/j4p/jars/jsse.jar:/Users/lyon/current/java/j4p/jars/jta-1.0.1B.jar:/Users/lyon/current/java/j4p/jars/junit-4.10.jar:/Users/lyon/current/java/j4p/jars/l2fprod-common-all.jar:/Users/lyon/current/java/j4p/jars/liblinear-1.51-with-deps.jar:/Users/lyon/current/java/j4p/jars/log4j-1.2.13.jar:/Users/lyon/current/java/j4p/jars/logback-core-1.0.7.jar:/Users/lyon/current/java/j4p/jars/mail.jar:/Users/lyon/current/java/j4p/jars/matetools-1.30.jar:/Users/lyon/current/java/j4p/jars/MRJToolkit.jar:/Users/lyon/current/java/j4p/jars/MRJToolkitStubs-1.0.jar:/Users/lyon/current/java/j4p/jars/mysql.jar:/Users/lyon/current/java/j4p/jars/natty-0.13-SNAPSHOT.jar:/Users/lyon/current/java/j4p/jars/nekohtml-1.9.15.jar:/Users/lyon/current/java/j4p/jars/openapi.jar:/Users/lyon/current/java/j4p/jars/opencsv-3.8.jar:/Users/lyon/current/java/j4p/jars/opennlp-maxent-3.0.2-incubating.jar:/Users/lyon/current/java/j4p/jars/opennlp-tools-1.5.2-incubating.jar:/Users/lyon/current/java/j4p/jars/opennlp-tools-1.6.0.jar:/Users/lyon/current/java/j4p/jars/org.eclipse.cdt.core_5.5.0.201306112328.jar:/Users/lyon/current/java/j4p/jars/org.eclipse.equinox.common_3.6.200.v20130402-1505.jar:/Users/lyon/current/java/j4p/jars/pde.jar:/Users/lyon/current/java/j4p/jars/phidget21.jar:/Users/lyon/current/java/j4p/jars/poi-3.15.jar:/Users/lyon/current/java/j4p/jars/poi-ooxml-3.16.jar:/Users/lyon/current/java/j4p/jars/poi-ooxml-schemas-3.7.jar:/Users/lyon/current/java/j4p/jars/portfolio.jar:/Users/lyon/current/java/j4p/jars/printf.jar:/Users/lyon/current/java/j4p/jars/QTJava.zip:/Users/lyon/current/java/j4p/jars/quaqua.jar:/Users/lyon/current/java/j4p/jars/resolver.jar:/Users/lyon/current/java/j4p/jars/rt.jar:/Users/lyon/current/java/j4p/jars/saaj-api.jar:/Users/lyon/current/java/j4p/jars/saaj-impl.jar:/Users/lyon/current/java/j4p/jars/sac-1.3.jar:/Users/lyon/current/java/j4p/jars/saxon-8.7.jar:/Users/lyon/current/java/j4p/jars/saxon-dom-8.7.jar:/Users/lyon/current/java/j4p/jars/secondstring.jar:/Users/lyon/current/java/j4p/jars/seg.jar:/Users/lyon/current/java/j4p/jars/selenium-firefox-driver-2.24.1.jar:/Users/lyon/current/java/j4p/jars/selenium-java-2.29.0.jar:/Users/lyon/current/java/j4p/jars/serializer-2.7.1.jar:/Users/lyon/current/java/j4p/jars/servlet.jar:/Users/lyon/current/java/j4p/jars/shippo-java-client-1.2.0.jar:/Users/lyon/current/java/j4p/jars/signpost-core-1.2.1.2.jar:/Users/lyon/current/java/j4p/jars/sjsxp.jar:/Users/lyon/current/java/j4p/jars/slf4j-api-1.7.7.jar:/Users/lyon/current/java/j4p/jars/slf4j-simple-1.7.7.jar:/Users/lyon/current/java/j4p/jars/sphinx4.jar:/Users/lyon/current/java/j4p/jars/spring-2.0.2.jar:/Users/lyon/current/java/j4p/jars/sqlite-jdbc-3.16.1.jar:/Users/lyon/current/java/j4p/jars/stanford-corenlp-3.6.0.jar:/Users/lyon/current/java/j4p/jars/stanford-parser.jar:/Users/lyon/current/java/j4p/jars/tattletale-1.1.2.Final.jar:/Users/lyon/current/java/j4p/jars/temboo_java_sdk_2.11.1.jar:/Users/lyon/current/java/j4p/jars/tools.jar:/Users/lyon/current/java/j4p/jars/util.jar:/Users/lyon/current/java/j4p/jars/velocity-1.7.jar:/Users/lyon/current/java/j4p/jars/webcam.jar:/Users/lyon/current/java/j4p/jars/webcam-capture-0.3.10.jar:/Users/lyon/current/java/j4p/jars/webserver.jar:/Users/lyon/current/java/j4p/jars/websocket-api-9.4.3.v20170317.jar:/Users/lyon/current/java/j4p/jars/websocket-client-9.4.3.v20170317.jar:/Users/lyon/current/java/j4p/jars/websocket-common-9.4.3.v20170317.jar:/Users/lyon/current/java/j4p/jars/whatswrong-0.2.3.jar:/Users/lyon/current/java/j4p/jars/wire-v1.3-b21.jar:/Users/lyon/current/java/j4p/jars/xalan-2.7.2.jar:/Users/lyon/current/java/j4p/jars/xercesImpl.jar:/Users/lyon/current/java/j4p/jars/xercesImpl-2.9.1.jar:/Users/lyon/current/java/j4p/jars/xml-apis-1.3.04.jar:/Users/lyon/current/java/j4p/jars/xmlsec.jar:/Users/lyon/current/java/j4p/jars/YahooFinanceAPI-3.4.0.jar:/Users/lyon/current/java/j4p/jars/joda-time-1.6.2.jar:/Users/lyon/current/java/j4p/jars/j3d/j3dOld/j3dcore.jar:/Users/lyon/current/java/j4p/jars/j3d/j3dOld/j3dutils.jar:/Users/lyon/current/java/j4p/jars/j3d/j3dOld/vecmath.jar:/Users/lyon/current/java/j4p/java3dBug/jogl1.5.2/gluegen-rt.jar:/Users/lyon/current/java/j4p/java3dBug/jogl1.5.2/j3dcore.jar:/Users/lyon/current/java/j4p/java3dBug/jogl1.5.2/j3dutils.jar:/Users/lyon/current/java/j4p/java3dBug/jogl1.5.2/jogl.jar:/Users/lyon/current/java/j4p/java3dBug/jogl1.5.2/vecmath.jar:/Users/lyon/current/java/j4p/jars/reflections-0.9.11.jar:/Users/lyon/current/java/j4p/jars/javassist-3.21.0-GA.jar top_package.j3d_test
gc:0:CGLGraphicsConfig[dev=1317015680,pixfmt=0]
Java 3D: implicit antialiasing disabled
Exception in thread "main" java.lang.IllegalArgumentException: Canvas3D: GraphicsConfiguration is not compatible with Canvas3D
        at javax.media.j3d.Canvas3D.checkForValidGraphicsConfig(Canvas3D.java:984)
        at javax.media.j3d.Canvas3D.<init>(Canvas3D.java:1025)
        at top_package.j3d_test.main(j3d_test.java:44)

What could the problem be?
Thanks!
 - Doug