JNI and web services
Raul Gutierrez Sanchez
raul at laeff.esa.es
Wed Apr 14 02:28:39 PDT 2004
Hi Matthew,
libfoo.so must be placed in a directory listed in the library path,
which is a list of directories that the Java runtime system searches
when loading libraries. Make sure that the name of the directory where
the libfoo.so library lives is in it. You can also change the library
path. If you use a UNIX-like system (as it seems), you have to add the
directory containing libfoo.so to your system $LD_LIBRARY_PATH (see the
following link for more information:
http://java.sun.com/docs/books/tutorial/native1.1/stepbystep/_setlibpath.html
).
Cheers,
Raúl
Matthew Graham wrote:
>Hi,
>
>I am trying to expose some C code as a web service via Java and JNI.
>Everything works fine in a standalone mode but when I put it all together
>as a web service with Tomcat/Axis, the dynamic library that JNI creates
>(libfoo.so) cannot be found. This is the classic UnsatisfiedLinkError that
>JNI throws out because the library is not in java.library.path; however,
>how does one go about setting java.library.path so that it will get picked
>up without hardcoding the Tomcat setup?
>
>I have tried setting java.library.path just before the C code is called
>and loading the library is attempted but it does not seem to work; has
>anyone tried this and if so, got it to work?
>
> 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