Yes, I even restarted the machine...
Main Topics
Browse All TopicsDoes anybody have experience with JNI with tomcat under mac os (intel)? Probably not... :-) Anyway, I thought I'd give it a shot here...
I'm doing some web-development and just switched to a macbook pro from pc. I've installed tomcat 5.5, and eclipse 3.2. The web application I'm building is using a native library written in c++, the library is compiled into a universal binary (libMyWrapper.jnilib) and works with a stand-alone java application on the same machine. When trying to load the library from tomcat i get an unsatisfied link error: java.lang.UnsatisfiedLinkE
I hope anyone out there can help me!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
It's working! Well kinda... I moved the jnilib to /usr/lib and loaded it with an absolute path using System.load("/usr/lib/libM
The jnilib is dependent on a few other libraries, using otool i get the following output:
libMyWrapper.jnilib:
libMyWrapper.jnilib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libiconv.2.dylib (compatibility version 5.0.0, current version 5.0.0)
libxerces-c.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libstdc++.6.dylib
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib
Even if I copy all these libraries to the java.class.path it doesn't work, could it be because of "recursive" dependency, i.e. the libSystem.B.dylib is dependent on a library outside the java.class.path?
On the other hand I added /usr/lib to the java.class.path and still it wouldn't load...
Any ideas?
Business Accounts
Answer for Membership
by: mayankeaglePosted on 2007-03-20 at 08:54:00ID: 18757210
>> So i printed the java.library.path to the console and put the required jnilib on all those places but it still didn't work.
Did you restart Tomcat after that? You need to....