JNI and web services

Raul Gutierrez Sanchez raul at laeff.esa.es
Thu Apr 15 01:41:01 PDT 2004


Have you tried to set $LD_LIBRARY_PATH in the configuration file (just 
as you set $CATALINA_HOME for example)?

Cheers,

Raúl

Matthew Graham wrote:

>Hi,
>
>I have no problem with running a standalone application which uses JNI
>where I can set LD_LIBRARY_PATH from the command line. The problem here is
>what to do with a web service that uses JNI: the library path seems to
>have to be set when Tomcat is started so I can include the path to
>libfoo.so in $CATALINA_OPTS but:
>- this is system dependent
>- what happens if I have a whole suite of libfoo's - I would also have to
>stop and restart Tomcat when I added a new one
>- this is not easily deployable to other machines where I might not have
>control over Tomcat.
>
>In the WS code I tried:
>
>String jlp = System.getProperty("java.library.path");
>String newpath = jlp + ":" + <path to libfoo.so>;
>System.setProperty("java.library.path", newpath);
>
>which does set java.library.path properly but the subsequent call:
>
>static (System.loadLibrary("foo"))
>
>does not pick the new path up and so I get the UnsatisfiedLinkError.
>
>	Cheers,
>
>	Matthew
>
>
>  
>

-- 
-----------------------------------------------------------------------------
Raúl Gutiérrez Sánchez      ( raul at laeff.esa.es )
Laboratorio de Astrofísica Espacial y Física Fundamental (www.laeff.esa.es)
Villafranca del Castillo Satellite Tracking Station
Villafranca del Castillo - E-28691 Villanueva de la Cañada - Madrid - España
Tel.: 34 91 8131260    Fax.: 34 91 8131160
-----------------------------------------------------------------------------





More information about the grid mailing list