Caldarale, Charles R wrote:
From: Martin Gainty [mailto:[EMAIL PROTECTED] Subject: Re: JNI in Tomcat6usually the binaries are located in %JAVA_HOME%/jre/binOnly DLLs that are part of the JVM should be placed in %JAVA_HOME%/jre/bin; this is not an appropriate location for application-specific native code.change LD_LIBRARY_PATH in jvm.cfg to point to the folder containing your DLLYou can't set LD_LIBRARY_PATH in jvm.cfg (at least not in the one in %JAVA_HOME%/jre/lib/[arch] for a Sun-based JVM; I know of no other locations for jvm.cfg). The jvm.cfg file is only for configuring which JVMs are available (just client and server, these days). The jvm.cfg mechanism is expected to disappear when the client and server JVMs are finally integrated into a single JVM. (If you want to see how jvm.cfg is processed, set the env var _JAVA_LAUNCHER_DEBUG to any value when you start the JVM from a command prompt.)
I'm feeling a bit of deja vu here.
Now back to Christian's original question:Where do i have to place the DLL File, that the Classloader will find it?The JVM finds native libraries by looking at the system property java.library.path. On Windows, the default value of this property is taken from the PATH environment variable, prefixed with a few directories the JVM launcher knows about (e.g., C:\WINDOWS\system32). The LD_LIBRARY_PATH environment variable is not used at all on Windows. On Linux/UNIX systems, the default java.library.path includes various directories from the JVM installation plus a few standard locations. For example, on one of our SUSE boxes, it's: /common/jdk6/jre/lib/amd64/server:/common/jdk6/jre/lib/amd64:/common/jdk 6/jre/../lib/amd64:/usr/java/packages/lib/amd64:/lib:/usr/lib On Linux/UNIX, the LD_LIBRARY_PATH environment variable can be used to modify the above list; whatever is specfied with that variable is inserted in the list just prior to the first /usr entry. The default value can be overridden by specifying -Djava.library.path=<whatever> on the command line for any platform. If Tomcat is running as a Windows service, you can use the tomcat?w.exe utility to set whatever value you want for the java.library.path property. On a running Tomcat, use the System Information -> System Properties screen of Lambda Probe (www.lambdaprobe.org) to display all of the property names and values. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
smime.p7s
Description: S/MIME Cryptographic Signature