Problem on snow leopard

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem on snow leopard

_diego
Hi,

I'm trying to install jogl but I'm running into some problems. When I run test.sh I get a NoClassDefFoundError:


/usr/bin/java
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode)
LIBXCB_ALLOW_SLOPPY_LOCK:
LIBGL_DRIVERS_PATH:
LIBGL_DEBUG:
java
LD_LIBRARY PATH: ./lib:
DYLD_LIBRARY PATH: ./lib:

CLASSPATH: jar/gluegen-rt.jar:jar/nativewindow.all.jar:jar/jogl.all.jar:jar/newt.all.jar

Exception in thread "main" java.lang.NoClassDefFoundError: com/jogamp/newt/opengl/GLWindow
Caused by: java.lang.ClassNotFoundException: com.jogamp.newt.opengl.GLWindow
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:315)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)


I set up everything in eclipse but I also get an error about library libjawt.dylib not being loaded:

Exception in thread "main" java.lang.UnsatisfiedLinkError: <some path>/JOGL/lib/libnativewindow_awt.jnilib:  Library not loaded: @rpath/libjawt.dylib   Referenced from: <some path>/JOGL/lib/libnativewindow_awt.jnilib   Reason: image not found

I've googled it but I haven't found anything useful

Thanks ;)
Reply | Threaded
Open this post in threaded view
|

Re: Problem on snow leopard

Wade Walker
Administrator
Hi Diego,

The etc/test.sh has to be run from the correct directory or it can't find its JAR files and native libraries. In an installed build, you have to run it from the directory that contains the etc, jar, and lib directories (i.e. from one level above the test.sh file itself). If you build JOGL yourself, you have to run test.sh from the jogl/build directory (which contains the jar and lib directories).

I just now downloaded JOGL b351 on OS X 10.6, decompressed the .7z with Keka, cd to the jogl dir, chmod +x etc/test.sh, typed etc/test.sh, and it worked OK for me.

However, when you do run etc/test.sh on Snow Leopard, you'll get a NEWT error at the end -- this is a known issue we're looking into. JOGL itself should still work, it's just that test.sh does some NEWT stuff that doesn't work on the Mac yet.
Reply | Threaded
Open this post in threaded view
|

Re: Problem on snow leopard

Diego
Hi,

Thanks for your reply.

I think I solved it. I guess the problem was in my java configuration, all I did was update the java using software update :)

Reply | Threaded
Open this post in threaded view
|

Re: Problem on snow leopard

Alex
In reply to this post by Wade Walker
I have this exact problem and I can find no way around it.

If I follow your exact instructions on 10.6.6 of downloading the OSX universal binary, unpacking and running test.sh from the correct directory, I get the following:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /Users/X/Documents/oss/jogl-2.0-b23-20110303-macosx-universal/lib/libnativewindow_awt.jnilib:  Library not loaded: @rpath/libjawt.dylib   Referenced from: /Users/X/Documents/oss/jogl-2.0-b23-20110303-macosx-universal/lib/libnativewindow_awt.jnilib   Reason: image not found

I've spent several hours trying to sort this out, AFAIKT this is related to JDK changes in snow leopard. If I try the JOGL tutorials I get the same error.
Reply | Threaded
Open this post in threaded view
|

Re: Problem on snow leopard

Wade Walker
Administrator
Hi Alex,

I just ran this again to be sure, and it still works (for me, at least). I'm running OS X 10.6.7, Java 1.6.0_24-b07-334, with an NVIDIA GeForce 320M. I downloaded the latest build (jogl-2.0-b392-20110522-macosx-universal.7z) and followed my directions above.

There are a few things to try, though:

- Upgrade to the latest Java
- Check your Java extensions directories, classpath, path, etc. for old versions of JOGL or other lib conflicts
- Upgrade to the latest OS X

Your libjawt.dylib should be at /Library/Java/JavaVirtualMachines/1.6.0_24-b07-334.jdk/Contents/Libraries/libjawt.dylib. The fact that your error says it can't be found seems to imply that upgrading Java might fix this.

Reply | Threaded
Open this post in threaded view
|

Re: Problem on snow leopard

Alex
Hi Wade,

I can report with much relief that upgrading java to 1.6.0_24-b07-334-10M3326 has fixed the problem.

Thanks for the help!

Alex
Reply | Threaded
Open this post in threaded view
|

Re: Problem on snow leopard

gouessej
Administrator
In reply to this post by Wade Walker
Hi!

Have you tested with Java 1.6 update 25 on Mac? Someone has just reported a problem with Firefox 4 and this update on Mac OS X 10.6 but with JOGL 1.1.1a whereas the problem is not reproducible with the update 24. Is there something wrong with JOGL 2.0 and the update 25 in applets? I will encourage the guy who reported this problem to fill a bug report if the port to JOGL 2 does not fix it.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Problem on snow leopard

Wade Walker
Administrator
I haven't tried Java update 25 on the Mac yet, but there's already a bug report for an applet problem on Firefox and Chrome with Java update 24 (see https://jogamp.org/bugzilla/show_bug.cgi?id=497). The JOGL 2 applet test only works on Safari on the Mac right now, Firefox and Chrome show a blank window.