Hi all,
I am starting with a new project and I want to use jogl. Just to make sure I would like to know if there are any known issues in using Java 5 with the latest jogl libs? If so, are there any plans to resolve those issues?
Thanks!
Hi all,
I am starting with a new project and I want to use jogl. Just to make sure I would like to know if there are any known issues in using Java 5 with the latest jogl libs? If so, are there any plans to resolve those issues?
Thanks!
No issues which I’m aware of. (Which doesn’t mean a lot, but for me Jogl with Java 1.5 works fine.)
No issues here either.
No problems sofar.
As it turns out, I have run into a small and trivial problem involving Jogl and Java 5 while running through a Jogl HelloWorld tutorial. Admittedly, I haven’t yet seen any instances in which the native libraries are loaded directly, but I suppose that it might come up somewhere for someone. At any rate, all of the jogl demos run smoothly. The tutorial in question is at http://www.genedavissoftware.com/books/jogl/ljogl_ch1.html
After placing jogl.jar in /opt/sun-jdk-1.5.0/jre/lib/ext and libjogl.so into /opt/sun-jdk-1.5.0/jre/lib/i386 and running the HelloWorld class, I was hit with the following after the call to System.loadLibrary(“jogl”);
Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/sun-jdk-1.5.0/jre/lib/i386/libjogl.so: libmawt.so: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:992)
at HelloWorld.main(HelloWorld.java:7)
When attempting to load libjogl.so, the program dies being unable to find libmawt.so (not to be confused with libjawt.so). Running ldd on /opt/sun-jdk-1.5.0/jre/lib/i386/libjogl.so gives me the following (emphasis added):
ldd libjogl.so
linux-gate.so.1 => (0xffffe000)
libGL.so.1 => /usr/lib/opengl/nvidia/lib/libGL.so.1 (0xb7e43000)
libGLU.so.1 => /usr/lib/libGLU.so.1 (0xb7dc1000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0xb7ce9000)
>>>> libjawt.so => not found <<<<
libc.so.6 => /lib/libc.so.6 (0xb7bbc000)
libGLcore.so.1 => /usr/lib/opengl/nvidia/lib/libGLcore.so.1 (0xb74cb000)
libnvidia-tls.so.1 => /usr/lib/opengl/nvidia/lib/tls/libnvidia-tls.so.1 (0xb74c8000)
libm.so.6 => /lib/libm.so.6 (0xb74a5000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0xb7494000)
libdl.so.2 => /lib/libdl.so.2 (0xb7490000)
libstdc++.so.6 => /usr/lib/gcc/i686-pc-linux-gnu/3.4.3/libstdc++.so.6 (0xb73bf000)
libgcc_s.so.1 => /usr/lib/gcc/i686-pc-linux-gnu/3.4.3/libgcc_s.so.1 (0xb73b6000)
/lib/ld-linux.so.2 (0x80000000)
Running ldd libjawt.so reveals that libjawt.so depends upon libmawt.so, and the program indeed runs fine once I’ve symlinked one of /opt/sun-jdk-1.5.0/jre/lib/i386/{motif21,xawt}/libmawt.so to i386/libmawt.so
Looking at the same folder for Java 1.4.2.05, it seems that all of these used to be in the same directory, and there were no motif21 and xawt directories until now. In fact, I suspect that it’s just a problem of the system’s path just being inaccurate, or the like. When it comes down to it, it’s not the fault of Jogl, per se, but I suppose that it constitutes a ‘problem’ when using jogl and Java 5.
Best of luck to you.
[quote]After placing jogl.jar in /opt/sun-jdk-1.5.0/jre/lib/ext and libjogl.so into /opt/sun-jdk-1.5.0/jre/lib/i386 and running the HelloWorld class, I was hit with the following after the call to System.loadLibrary(“jogl”);
Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/sun-jdk-1.5.0/jre/lib/i386/libjogl.so: libmawt.so: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:992)
at HelloWorld.main(HelloWorld.java:7)
[/quote]
Are you running JDK 1.5.0 FCS? I believe this UnsatisfiedLinkError was fixed in one of the later betas, and FCS works out-of-the-box for me.