I am running an Ubuntu machine, on which I have installed JOGL/GlueGen using the Debian package system. I have version 2.0-rc3, the most recent version available through Debian. The code I wrote for JOGL runs fine using the libraries /usr/share/java/jogl2.jar (installed from the package libjogl-java) and /usr/share/java/gluegen2-2.0-rc3-rt.jar (installed from the package libgluegen2-rt-java). These refer to the following native libraries:
/usr/lib/jni/libgluegen2-rt.so (installed from libgluegen2-jni) /usr/lib/jni/libjogl_desktop.so (installed from libjogl2-jni) /usr/lib/jni/libjogl_mobile.so (installed from libjogl2-jni) /usr/lib/jni/libnativewindow_awt.so (installed from libjogl2-jni) /usr/lib/jni/libnativewindow_x11.so (installed from libjogl2-jni) /usr/lib/jni/libnewt.so (installed from libjogl2-jni) And everything works out wonderfully. Except this: The JOGL/GlueGen natives downloadable from http://jogamp.org/deployment/v2.0-rc9/jar/ don't match those names. Specifically the gluegen native. If I run my program anywhere other than my Ubuntu machine, it won't work, because it looks for "gluegen2-rt", NOT "gluegen-rt". AND if I rename the "gluegen-rt" native to "gluegen2-rt" (with appropriate suffix), it crashes on account of it can't find some native method. And when I look at the source for loading the gluegen-rt native, it is hardcoded to look for gluegen2-rt. Q1. Why is there this inconsistency? Q2. How can I fix my program? |
Administrator
|
Hi
Names have recently changed in order to ease Maven support. Anyway, I don't know why the maintainer uses different names. Please don't mix JARs and native libraries of different versions, it will only cause headaches and lots of troubles. For example, when I do that accidently in an Eclipse RCP application, I get a NullPointerException when calling GLProfile.getDefault(). Use the packages or uninstall them cleanly and use another version of GlueGen and JOGL.
Julien Gouesse | Personal blog | Website
|
Administrator
|
On 07/07/2012 09:05 PM, gouessej [via jogamp] wrote:
> Hi > > Names have recently changed in order to ease Maven support. Anyway, I don't > know why the maintainer uses different names. I guess Sylvestre did this to avoid collision w/ ole packages (gluegen, jogl). @Sylvestre: For the next release I guess you can safely use the native jars and drop the plain native lib files. If they are all installed in a 'jogamp' place it will all work out well. Include the jogamp java jars to classpath, don't include the native jars. Maybe this will allow to install 'em side by side w/ other versions ? ~Sven signature.asc (910 bytes) Download Attachment |
In reply to this post by gouessej
As I forgot to mention, I actually tried 2.0-rc3 natives with my program, and it still didn't work. The jars came from the Debian package, but they won't work with the natives from any version. |
In reply to this post by Sven Gothel
The problem is that even when I change the name of the natives to "gluegen2-rt", it still crashes. I don't include the native jars in the classpath. And the computer will _recognize_ the natives, it just can't find certain native methods. |
Administrator
|
In reply to this post by ObsequiousNewt
Maybe Sylvestre recompiled JOGL and did not modify the name of the native libraries in the code. Anyway, I advise you to uninstall the packages and to use the RC9 without trying to mix them with the natives from here. Don't complicate this task. I use JOGL daily under Mageia Linux, it works fine. I don't use packages because it is only interesting if updated very frequently otherwise I don't get the latest fixes.
Julien Gouesse | Personal blog | Website
|
I had thought that might be the solution. Thanks anyway.
|
Free forum by Nabble | Edit this page |