> From: StrongSteve [mailto:ste...@starkeweb.org] > Subject: RE: Tomcat loading dlls > > > If a Java program calls System.loadLibrary("XXX"), are all directories > specified by the PATH varibale searched for a DLL called XXX?
For Windows, yes, in the order specified on the PATH variable. For Linux, the LD_LIBRARY_PATH variable is used. Both are overridden by the java.library.path system property, if present. > Can anyone explain the difference between PATH, CLASSPATH and > java.library.path. PATH is where the OS searches for executables, and also where a Windows JVM searches for loadLibrary() references by default. Unless the java.library.path system property is explicitly set, the Windows Java launchers set it to the value of PATH. You may specify java.library.path on the command line to avoid the overhead of searching through PATH, which is often a rather long list, and might encounter DLL versions you didn't want to load. The CLASSPATH environment variable is a hold-over from the early days of Java, and really should never be used. It sets the default location for where the JVM should search for class files. Such a location should be specified on the command line via the -cp parameter or the java.class.path system property. (Apple should be ashamed of themselves for setting CLASSPATH in the system environment variables whenever QuickTime is installed or updated on Windows - that's extremely obnoxious behavior.) The use of CLASSPATH has caused an incredible amount of confusion and grief over the years. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org