Library issues with 32Bit JVM on 64Bit OS

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

Library issues with 32Bit JVM on 64Bit OS

MDHillman
Hi all,

I currently have a Java application that, at run time, attempts to set Java's library path to the 64Bit Gluegen & Jogl DLLs then tests them, if this test fails, the 32Bit libraries are loaded.

This seems to work unless I'm using a 32Bit JVM on a 64Bit OS, where neither libraries work. I've tried using the native JAR files but these don't seem to work either.

Any ideas how to address this?
Reply | Threaded
Open this post in threaded view
|

Re: Library issues with 32Bit JVM on 64Bit OS

gouessej
Administrator
Hi

I don't set the Java library path and it works out of the box in my case with a 32 bits JVM on a 64 bits OS. We are not responsible for your own mechanism, the problem may come from it.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Library issues with 32Bit JVM on 64Bit OS

Xerxes Rånby
In reply to this post by MDHillman

The jogamp 32bit libs only work with 32bit os opengl drivers. Your os probably only contains 64bit opengl libraries so it will not work. The problem is that compilers do not allow compilation of a 32bit jni lib that can link to 64bit system libs.


2013-01-22 16:16 skrev MDHillman [via jogamp]:

Hi all,

I currently have a Java application that, at run time, attempts to set Java's library path to the 64Bit Gluegen & Jogl DLLs then tests them, if this test fails, the 32Bit libraries are loaded.

This seems to work unless I'm using a 32Bit JVM on a 64Bit OS, where neither libraries work. I've tried using the native JAR files but these don't seem to work either.

Any ideas how to address this?


If you reply to this email, your message will be added to the discussion below:
http://forum.jogamp.org/Library-issues-with-32Bit-JVM-on-64Bit-OS-tp4027978.html
To start a new topic under general, email [hidden email]
To unsubscribe from jogamp, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Library issues with 32Bit JVM on 64Bit OS

MDHillman
In reply to this post by MDHillman
OK, let me look at this from the ground up.

I've added the JOGL and Gluegen jar files from the central maven repository (POM below). It was my understanding that the loading of native libraries was all handled by JOGL/Gluegen and that once I'd added these dependancies I wouldn't have to do anything. Saying that, I still get "no gluegen-rt.dll in library path" errors. Have I missed something?

<dependency>
      <groupId>org.jogamp.jogl</groupId>
      <artifactId>jogl-all-main</artifactId>
      <version>2.0-rc11</version>
</dependency>
<dependency>
      <groupId>org.jogamp.gluegen</groupId>
      <artifactId>gluegen-rt-main</artifactId>
      <version>2.0-rc11</version>
</dependency>
Reply | Threaded
Open this post in threaded view
|

Re: Library issues with 32Bit JVM on 64Bit OS

gouessej
Administrator
The JARs containing the native libraries must be in the same directory than the JARs containing Java libraries. Maybe the extraction and loading of native libraries does not work in your case. Do you modify the Java library path? Ardor3D uses Maven with JOGL 2.0 and it works very well. As Xerxes said, you need a 32 bits OpenGL driver to use 32 bits native libraries for JOGL.

Please try to run simple existing tests first.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Library issues with 32Bit JVM on 64Bit OS

pizaninja
The big problem is that when compiling with maven with a 64 bit jdk, it can't run on 32 bit jre. It should work, but it does not.

The jar compiled with 64 bit jdk create a jar archive only with 64 bit native library. It should embed all 32 and 64 bit native libs, but it does not.

I don't understand why gouessej says: "We are not responsible".
Reply | Threaded
Open this post in threaded view
|

Re: Library issues with 32Bit JVM on 64Bit OS

pizaninja
In reply to this post by MDHillman
I have the same problem.
Reply | Threaded
Open this post in threaded view
|

Re: Library issues with 32Bit JVM on 64Bit OS

pizaninja
In reply to this post by gouessej
Unfortunatly, the example given here does not work: http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE -> Add a dependency on jogl-all-main and gluegen-rt-main to your project

The following sentence is wrong: "Maven will pull all of the dependencies the next time you attempt to build the project.".
Reply | Threaded
Open this post in threaded view
|

Re: Library issues with 32Bit JVM on 64Bit OS

io7m
Well, actually, the sole reason that gluegen-rt-main and jogl-all-main exist are to create a dependency on the other artifacts that provide the native libraries. Maven must (as a fundamental part of how it deals with artifacts) pull in all of those dependencies into the local package cache if they don't already exist.

You can see the jogl-all package here, with all of the associated native library jars:

http://search.maven.org/#search|ga|1|a%3A%22jogl-all%22

And the POM file of the jogl-all-main package, that explicitly depends on all of the native libraries:

https://search.maven.org/remotecontent?filepath=org/jogamp/jogl/jogl-all-main/2.0-rc11/jogl-all-main-2.0-rc11.pom

If Maven isn't pulling dependencies on build, then there's something seriously wrong with dependency resolution on your system.

Could you give more information on your setup? Maven version, perhaps...