tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Andersson <andr...@travelstart.se>
Subject Re: Using native and ld_library_path
Date Thu, 27 Jan 2005 07:52:27 GMT
Caldarale, Charles R wrote:

> Yes, except the property name is java.library.path (LD_LIBRARY_PATH is only the environment
variable name).  The default for Linux systems is /usr/lib:/lib (for UNIX, it's just /usr/lib),
so you could put the .so file there.

I tried putting all of the files there but still get the same 
java.lang.UnsatisfiedLinkError when trying to invoke the method. When 
issuing the command 
System.out.println(System.getProperties().get("java.library.path"));
right before the error occurs I can see the correct folders there. Is 
there anything else that would differ between running this through 
tomcat than from prompt?

> I think you have to be careful about where the System.loadLibrary() call is issued, since
a native library can only be loaded for one class loader.  This has implications for sharing
the code across applications and for redeploying applications.

I never use System.loadLibrary() in the javacode that does work (outside 
tomcat), do I have to?

-- 
Andreas Andersson
IT Dept.
Travelstart Nordic
andreas@travelstart.se
http://www.travelstart.se

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message