Eclipse install of JOGL failed after following wiki instructions

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

Eclipse install of JOGL failed after following wiki instructions

bsder
I'm on OS X 10.6.8, Eclipse Juno Service Release 1 and java -version returns:
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-10M3909)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)


I tried following the instructions for installing JOGL via an Eclipse JOGL Project here:
http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE

They really should be updated to reflect how to use jogamp-all-platforms.7z ... even better would be an export of an actual Eclipse JOGL project ... nevertheless ...

I managed to set up a JOGL project, and get through the "Order and Export" steps.  I created a new project, and made my project depend on the JOGL project.  Everything compiles fine.

However, when I run it as a Java application I get:

Catched ZipException: error in opening zip file, while TempJarCache.bootstrapNativeLib() of jar:file:/Users/andrewl/Desktop/ework/JOGL/jogamp-all-platforms/jar/gluegen-rt-android-natives-macosx-universal.jar!/ (file:/Users/andrewl/Desktop/ework/JOGL/jogamp-all-platforms/jar/ + gluegen-rt-android-natives-macosx-universal.jar)
Exception in thread "main" java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1758)
        at java.lang.Runtime.loadLibrary0(Runtime.java:823)
        at java.lang.System.loadLibrary(System.java:1045)
        at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:442)
        at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:59)
        at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:90)
        at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:328)
        at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:390)
        at com.jogamp.common.os.Platform.loadGlueGenRTImpl(Platform.java:251)
        at com.jogamp.common.os.Platform.access$000(Platform.java:57)
        at com.jogamp.common.os.Platform$1.run(Platform.java:186)
        at com.jogamp.common.os.Platform$1.run(Platform.java:183)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.jogamp.common.os.Platform.<clinit>(Platform.java:183)
        at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:82)
        at org.allcaps.joglhello.JOGLHello.main(JOGLHello.java:21)

So, what's the proper solution to this?  Presumably I need to bash *something* in Eclipse in the JOGL project to pick up the libgluegen-rt.jnilib.  However, I have no idea what I need to adjust.

Any suggestions?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse install of JOGL failed after following wiki instructions

Sven Gothel
Administrator
On 11/28/2012 11:31 AM, bsder [via jogamp] wrote:

> I'm on OS X 10.6.8, Eclipse Juno Service Release 1 and java -version returns:
> java version "1.6.0_37"
> Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-10M3909)
> Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)
>
>
> I tried following the instructions for installing JOGL here:
> http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE
>
> They really should be updated to reflect how to use jogamp-all-platforms.7z
> ... even better would be an export of an actual Eclipse JOGL project ...
> nevertheless ...
yup, sorry & thx.

>
> I managed to set up a JOGL project, and get through the "Order and Export"
> steps.  I created a new project, and made my project depend on the JOGL
> project.  Everything compiles fine.
>
> However, when I run it as a Java application I get:
>
> Catched ZipException: error in opening zip file, while
> TempJarCache.bootstrapNativeLib() of
> jar:file:/Users/andrewl/Desktop/ework/JOGL/jogamp-all-platforms/jar/gluegen-rt-android-natives-macosx-universal.jar!/
> (file:/Users/andrewl/Desktop/ework/JOGL/jogamp-all-platforms/jar/ +
> gluegen-rt-android-natives-macosx-universal.jar)
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no gluegen-rt in
> java.library.path
>         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1758)
>         at java.lang.Runtime.loadLibrary0(Runtime.java:823)
>         at java.lang.System.loadLibrary(System.java:1045)
Here, you probably have loaded gluegen-rt-android.jar, leading to attempt to load
gluegen-rt-android-natives-macosx-universal.jar, which doesn't exist.

Please 'only' use gluegen-rt.jar and jogl-all.jar for running/testing a desktop project,
or put the 'android' versions _after_ the desktop files.

As long the native jar files are in the same folder as the java jar files,
all should work them - no need to fiddle w/ native library environment options
or otherwise.

~Sven



signature.asc (909 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse install of JOGL failed after following wiki instructions

gouessej
Administrator
In reply to this post by bsder
Hi

bsder wrote
I tried following the instructions for installing JOGL via an Eclipse JOGL Project here:
http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE

They really should be updated to reflect how to use jogamp-all-platforms.7z ... even better would be an export of an actual Eclipse JOGL project ... nevertheless ...
This image needs an update in order to replace jogl.all.jar by jogl-all.jar, not a big deal. However, there is no gluegen-rt-android in the build path in this screen capture, there is no possible confusion here. Just look at "see the instructions at Downloading and installing JOGL", it explains how to use the archive. Wade Walker made a typical JOGL fragment for Eclipse but it still relied on an old RC the last time a colleague of mine used it (I don't remember where it is stored).

I use Eclipse 4.3 Kepler M2, I prefer relying on Ant (and sometimes Maven) in my IDE, the installation of the development environment for my project is very simple:
http://tuer.sourceforge.net/download.php
Julien Gouesse | Personal blog | Website