This is a debian suggesting strace to be the one for me. Can I attach strace to my .so-file or do I have to start tomcat via strace?
-- .so.s don't have independent existence. You run strace on a process. I recommend using the -p option to attach it to the JVM after the JVM is up but before you try to touch your code. > 2) Generally, you can get some clues on UnsatisfiedLinkError, in a > pinch, by using LD_DEBUG or strace (or truss or whatever). If I'm not misstaken tomcat ignores environment variables so how can I set LD_DEBUG? -- Tomcat can't 'ignore' LD_ environment variables. They control how ld.so loads the JVM into the process address space and links it. You put env settings in bin/setenv.sh. You will need such a setting for LD_LIBRARY_PATH, at least. > A) Any .so has to be in java.library.path and in LD_LIBRARY_PATH. Any > dependencies of the .so (visible with 'ldd', likewise). java.library.path _AND_ LD_LIBRARY_PATH? Thats intersting and might very well be the solution to my problem. As I just wrote I think tomcat ignores these evironment variabels. I was under the impression that LD_LIBRARY_PATH was the same as java.library.path, if that is not the case then how do I set LD_LIBRARY_PATH? -- you set the environment variable in bin/setenv.sh or the equivalent. You also set java.library.path there, generally. > Thus, I always put native classes in the 'common' classloader by > adding the jars to common.loader in catalina.properties. Is it also OK to add .so-files? I have grant codeBase "file:${catalina.home}/common/-" { permission java.security.AllPermission; }; in my catalina.properties. Would that suggest that if I only placed all .so-files under /common they would be loaded or at least accessable? -- you can never 'add a .so' to a classpath. You add the Java class with the 'native' methods, and when it calls System.loadLibrary, the fun begins. The jar containing the native-method classes is the important one. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]