That is true, but assuming things for library loading will eventually bite you ... big time.
FYI: In Windows there is a patch available that can damage this path searching defaults and assumptions always bite you. It is always best to specifically set these variables (JVM search paths etc...) so there are no assumptions, and it's always better to specify a particular location of a library (using an environment variable works best here) if you don't set the JVM/environment so a random library doesn't get used by accident. I'm sure everyone's heard of DLL Hell (or .so Hell)... assuming paths that may not be correct in 100% of situations are the path to problems. Bill -----Original Message----- From: André Warnier [mailto:a...@ice-sa.com] Sent: July 12, 2011 2:27 PM To: Tomcat Users List Subject: Re: JNA class path with tomcat Bill Miller wrote: > The problem is undoubtedly your .dll or .so is not in the correct directory. That's probably true. Normally you need to > place those files in /tomcat but that assumes that /tomcat is your current > directory when you > startup. Essentially you need to ensure that you are starting tomcat from the > base directory that > also contains your native code, then everything will work fine. > But that is probably hogwash. The JVM which runs Tomcat has a series of paths where it will look for classes and libraries; to which Tomcat itself adds its own series of paths; to which the webapp classloader adds its own. The library should be in one of those, depending what its "scope" is. See here for the real explanation: http://tomcat.apache.org/tomcat-7.0-doc/class-loader-howto.html --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org