I'm having some major issues with getting JOGL to work on snow leopard.
I've installed all the necessary JOGL jars in
/system/library/java/extensions
I can get sample code to compile but when I attempt to run it it throws the error following error on trying to actually display the window.
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.macosx.MacOSXJAWTWindow.lockSurface(MacOSXJAWTWindow.java:65)
at com.sun.opengl.impl.GLDrawableImpl.lockSurface(GLDrawableImpl.java:144)
at com.sun.opengl.impl.macosx.cgl.MacOSXCGLDrawable.setRealizedImpl(MacOSXCGLDrawable.java:87)
at com.sun.opengl.impl.GLDrawableImpl.setRealized(GLDrawableImpl.java:120)
at javax.media.opengl.awt.GLCanvas.addNotify(GLCanvas.java:413)
at java.awt.Container.addNotify(Container.java:2622)
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 SimpleJOGL.main(SimpleJOGL.java:45)
Has anyone seen this error before and if they have how did you fix it?
Regards
James
EDIT: This error appears using both Java 1.5开发者_如何学Python and Java 1.6 and I've tried JOGL beta 5, beta 10 and the nightly builds
What build of JOGL are you using, and what version of Java (1.5 or 1.6)? There was some talk of the beta 5 release having this issue. I found this link. It's a shot in the dark but without more information it's all I have.
JOGL Kenai Link
I was able to download a version of JOGL from the following link
JOGL JSR 231 Beta 10
I downloaded the mac universal zip and was able to get it working by putting the jars on the classpath and pointing the java.library.path to the the directory I unzipped the archive to. The archive includes all of the .so files you need to get JOGL running. I don't think you need all of the jars included here. There seem to be a lot of files related to the CDC, which I think is a mobile platform if memory serves. I didn't include these in my test.
I didn't get the error you mentioned and am running Snow Leopard on a Core Duo MacBook Pro. The used the source from the Gears demo and it ran without a hitch. I even switched out the Frame with a JFrame to see if that would change anything. It worked fine both ways. You may want to try with this library and see if that works for you.
精彩评论