I was facing a similar linking error problem but with Tomcat 3.3a and
jdk1.3.1_03 on windows. Actually I was trying to make my own dll and then
calling that dll through jni calls from my servlet. I made a sample java
application to call that dll method and it was working fine. But when I was
trying to put packages in the same sample java program the same linking
error was coming .I then rebuilt the dll with package declaration and this
time it worked. I kept the dll in system's path. But I've not tested it
completely but you can give it a try. 

Thanks
Rajesh



-----Original Message-----
From: Mr. Tomcat [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 16, 2002 7:17 PM
To: Tomcat Users List
Subject: More info re: tomcat, 1.4 and jni for Jmagick


I did some more experimentation on this.  It seems that the way Tomcat's
classloader works is somehow preventing JNI from working.  The
LD_LIBRARY_PATH env variable is completely ignored.  No amount of
System.load() or System.loadLibrary() does anything.  The
java.library.path System property looks like this:

/usr/java/j2sdk1.4.0_01/jre/lib/i386/client
/usr/java/j2sdk1.4.0_01/jre/lib/i386
/usr/java/j2sdk1.4.0_01/jre/../lib/i386

but here is the weird part: even if I put the Jmagick and Imagemagick
shared libs in those directories in the JAVA_HOME, I still get a linking
error when I try to use them.

This is all with Tomcat 4.0.4 and JDK 1.4, with Linux.

So, the question is, can we still use JNIs with JDK 1.4, and if so,
how?  If there is no more JNI with JDK 1.4, is this something which is
being worked on, or do we have to move strictly to pure Java, or do we
need to go back to JDK 1.3?

Thanks!


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to