22 messages in net.java.dev.jna.usersRe: [jna-users] Unable to load a library
FromSent OnAttachments
Simon BASLEJul 17, 2007 6:12 am 
Timothy WallJul 17, 2007 9:16 am 
Simon BASLEJul 17, 2007 9:44 am 
Timothy WallJul 17, 2007 10:10 am 
Simon BASLEJul 17, 2007 10:12 am 
Timothy WallJul 17, 2007 11:18 am 
Nikolas LotzJul 18, 2007 1:27 am 
Simon BASLEJul 18, 2007 5:35 am 
Nikolas LotzJul 19, 2007 5:57 am 
Simon BASLEJul 19, 2007 6:07 am 
Nikolas LotzJul 19, 2007 9:08 am 
Simon BASLEJul 24, 2007 8:40 am 
Simon BASLEJul 24, 2007 8:40 am 
Timothy WallJul 24, 2007 9:55 am 
Timothy WallJul 24, 2007 10:08 am 
Simon BASLEJul 25, 2007 6:00 am 
Simon BASLEJul 25, 2007 7:33 am 
Timothy WallJul 25, 2007 7:53 am 
Timothy WallJul 25, 2007 7:58 am 
Simon BASLEJul 25, 2007 8:29 am 
Timothy WallJul 25, 2007 12:32 pm 
Timothy WallJul 26, 2007 2:44 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] Unable to load a libraryActions...
From:Timothy Wall (twal@dev.java.net)
Date:Jul 25, 2007 7:53:03 am
List:net.java.dev.jna.users

On Jul 25, 2007, at 9:00 AM, Simon BASLE wrote:

This is really weird / sad : I've managed to get it working, without even setting LD_LIBRARY_PATH (both libraries are in /usr/lib anyway) but ONLY IN JRE 1.4 ?!?

Yes it works perfectly well provided I do a

System.load(/usr/lib/libpvm3.so) prior to retrieving my jna gpvm Library INSTANCE. But only if I'm running on java 1.4 (gcj JRE that comes with my ubuntu linux), not when using Java 5 :'(

Have you tried Sun's JRE1.4? gcj is a substantially different implementation, and there's no guarantee that manual library loading works the same way in the two vendors' implementations.

PS : When setting LD_LIBRARY_PATH to /usr/lib, it doesn't work better in Java 5...

This seems odd. You might try writing a short C program that dynamically loads libpvm3 using dlopen. If *that* fails, then you rule out anything java-specific.

All JNA does is call dlopen with a few different library prefixes and suffixes.