tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shimon Crown <shimon.cr...@equipnet.co.il>
Subject Classloading problems with JNI
Date Mon, 05 Aug 2002 13:14:42 GMT
Tomcat 4.0.  J2SDK1.4 (Windows NT4).

I have a couple of jars that use JNI. Originally I put these jars into the applications web-inf
directory. Presumably these classes were only loaded once as everything went okay. The native
code performs a callback into classes defined in these jars and has to create java classes
defined by me. Unfortunately the native dll is unable to locate these classes and I fail in
the native line

    jclass variantClass = env->FindClass("MYCLASS");

The same thing happens when I put the JNI jars in %CATALINA_HOME%/lib which I believe is the
correct place for them.

I tried the same thing with jetty web server and found that JNI is unable to find classes
in the web-inf/lib directory. However if I included these JNI containing jars as part of the
classpath that I gave when running the Jetty server then it could find them.

Any suggestions.

Shimon Crown

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message