Hello everyone and thanks for reading my post!
I am having trouble getting the new version of JOGL to work on my computer (I am currently running Windows XP); it was working well before, but now I receive a RuntimeException and my programs crash upon startup:
Exception in thread “main” java.lang.RuntimeException: Unable to initialize JAWT
at com.sun.nativewindow.impl.jawt.JAWT$1.run(JAWT.java:100)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.nativewindow.impl.jawt.JAWT.getJAWT(JAWT.java:95)
at com.sun.nativewindow.impl.jawt.windows.WindowsJAWTWindow.lockSurface(WindowsJAWTWindow.java:69)
at com.sun.opengl.impl.GLDrawableImpl.lockSurface(GLDrawableImpl.java:121)
at com.sun.opengl.impl.windows.wgl.WindowsWGLDrawable.setRealized(WindowsWGLDrawable.java:70)
at glux.awt.GLXCanvas.addNotify(GLXCanvas.java:192)
at java.awt.Container.addNotify(Container.java:2578)
at javax.swing.JComponent.addNotify(JComponent.java:4685)
at java.awt.Container.addNotify(Container.java:2578)
at javax.swing.JComponent.addNotify(JComponent.java:4685)
at java.awt.Container.addNotify(Container.java:2578)
at javax.swing.JComponent.addNotify(JComponent.java:4685)
at java.awt.Container.addNotify(Container.java:2578)
at javax.swing.JComponent.addNotify(JComponent.java:4685)
at javax.swing.JRootPane.addNotify(JRootPane.java:739)
at java.awt.Container.addNotify(Container.java:2578)
at java.awt.Window.addNotify(Window.java:662)
at java.awt.Frame.addNotify(Frame.java:470)
at java.awt.Window.show(Window.java:858)
at java.awt.Component.show(Component.java:1563)
at java.awt.Component.setVisible(Component.java:1515)
at java.awt.Window.setVisible(Window.java:841)
at test.GLXCanvasTest.initializeFrame(GLXCanvasTest.java:77)
at test.GLXCanvasTest.(GLXCanvasTest.java:48)
at test.GLXCanvasTest.main(GLXCanvasTest.java:210)
I used a custom implementation of a GLCanvas which I modified for the new version of the API, so I tried using the GLCanvas provided with JOGL; however, more exceptions were thrown:
[i]Exception in thread “main” java.lang.RuntimeException: Unable to initialize JAWT
at com.sun.nativewindow.impl.jawt.JAWT$1.run(JAWT.java:100)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.nativewindow.impl.jawt.JAWT.getJAWT(JAWT.java:95)
at com.sun.nativewindow.impl.jawt.windows.WindowsJAWTWindow.lockSurface(WindowsJAWTWindow.java:69)
at com.sun.opengl.impl.GLDrawableImpl.lockSurface(GLDrawableImpl.java:121)
at com.sun.opengl.impl.windows.wgl.WindowsWGLDrawable.setRealized(WindowsWGLDrawable.java:70)
at javax.media.opengl.awt.GLCanvas.addNotify(GLCanvas.java:413)
at java.awt.Container.addNotify(Container.java:2578)
at java.awt.Window.addNotify(Window.java:662)
at java.awt.Frame.addNotify(Frame.java:470)
at java.awt.Window.show(Window.java:858)
at java.awt.Component.show(Component.java:1563)
at java.awt.Component.setVisible(Component.java:1515)
at java.awt.Window.setVisible(Window.java:841)
at test.JOGLAPP.(JOGLAPP.java:31)
at test.JOGLAPP.main(JOGLAPP.java:16)
java.lang.Exception: JAWT Surface previously locked by main
at com.sun.nativewindow.impl.jawt.JAWTWindow.lockSurface(JAWTWindow.java:96)
at com.sun.nativewindow.impl.jawt.windows.WindowsJAWTWindow.lockSurface(WindowsJAWTWindow.java:60)
at com.sun.opengl.impl.GLDrawableImpl.lockSurface(GLDrawableImpl.java:121)
at com.sun.opengl.impl.windows.wgl.WindowsWGLDrawable.setRealized(WindowsWGLDrawable.java:70)
at javax.media.opengl.awt.GLCanvas.addNotify(GLCanvas.java:413)
at java.awt.Container.addNotify(Container.java:2578)
at java.awt.Window.addNotify(Window.java:662)
at java.awt.Frame.addNotify(Frame.java:470)
at java.awt.Window.show(Window.java:858)
at java.awt.Component.show(Component.java:1563)
at java.awt.Component.setVisible(Component.java:1515)
at java.awt.Window.setVisible(Window.java:841)
at test.JOGLAPP.(JOGLAPP.java:31)
at test.JOGLAPP.main(JOGLAPP.java:16)
Exception in thread “AWT-EventQueue-0” javax.media.nativewindow.NativeWindowException: JAWT Surface already locked - AWT-EventQueue-0 JAWT-Window[windowHandle 0x0, surfaceHandle 0x0, pos 4/34, size 292x262, visible true, locked true,
config class javax.media.nativewindow.awt.AWTGraphicsConfiguration[class javax.media.nativewindow.awt.AWTGraphicsScreen[class javax.media.nativewindow.awt.AWTGraphicsDevice[type AWT, awtDevice D3DGraphicsDevice[screen=0],
…
[/i]
It now mentions something about the AWT surface already being locked. I find this strange because everything was working well in the previous version; I suspect that I installed JOGL incorrectly (I did what I usually do and placed the files in the bin and lib/ext directories). If it helps, my programs always crash in the line where I call drawable.setRealized(true);. Why is there a problem initializing JAWT? Any help would be greatly appreciated; thank you very much!