Login  Register

Javafx causes jogl problem in mac

Posted by runiter on Feb 28, 2013; 8:55pm
URL: https://forum.jogamp.org/Javafx-causes-jogl-problem-in-mac-tp4028417.html

Most of my GUI is in swing but recently I included a javafx chart component in my Ardor3D application.
It works fine in Windows but in Mac OS X I get the exception below. If I remove either Jogl canvas or Javafx component it works fine but if both of them are present at same time I get this exception (should I file a new bug?):

java.lang.ClassCastException: javax.media.nativewindow.DefaultGraphicsConfiguration cannot be cast to com.jogamp.nativewindow.awt.AWTGraphicsConfiguration
        at javax.media.opengl.awt.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:1096)
        at javax.media.opengl.awt.GLCanvas.addNotify(GLCanvas.java:529)
        at java.awt.Container.addNotify(Container.java:2769)
        at javax.swing.JComponent.addNotify(JComponent.java:4743)
        at java.awt.Container.addNotify(Container.java:2769)
        at javax.swing.JComponent.addNotify(JComponent.java:4743)
        at java.awt.Container.addNotify(Container.java:2769)
        at javax.swing.JComponent.addNotify(JComponent.java:4743)
        at java.awt.Container.addNotify(Container.java:2769)
        at javax.swing.JComponent.addNotify(JComponent.java:4743)
        at java.awt.Container.addNotify(Container.java:2769)
        at javax.swing.JComponent.addNotify(JComponent.java:4743)
        at javax.swing.JRootPane.addNotify(JRootPane.java:756)
        at java.awt.Container.addNotify(Container.java:2769)
        at java.awt.Window.addNotify(Window.java:770)
        at java.awt.Frame.addNotify(Frame.java:487)
        at java.awt.Window.show(Window.java:1031)
        at java.awt.Component.show(Component.java:1651)
        at java.awt.Component.setVisible(Component.java:1603)
        at java.awt.Window.setVisible(Window.java:1014)
        at org.concord.energy3d.MainApplication.main(MainApplication.java:35)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at com.sun.javaws.Launcher.executeApplication(Unknown Source)
        at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
        at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
        at com.sun.javaws.Launcher.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:722)
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D