This week's book giveaway is in the NodeJS forum. We're giving away four copies of Serverless Applications with Node.js and have Slobodan Stojanovic & Aleksandar Simovic on-line! See this thread for details.
First of all, I'm sorry if my english is not so good.
I'm trying to use JMagick in a J2EE web application. My servlet container is IBM Websphere v6.1 and OS is Ubuntu 10.10.
In installed ImageMagick and JMagick from Ubuntu repository: imagemagick version 7:22.214.171.124-1ubuntu1.1, libjmagick6-java version 6.2.6-0-6build1 and libjmagick6-jni version 6.2.6-0-6build1.
Can anyone tell me how to link jmagick jar and the native library (.so) to my web application or to servlet container?
For Websphere 6.1 running on Windows 7, I found this topic and it worked:
<<As the System Class Loader will delegate to the Extension Class Loader,
a simple alternative to the above is to drop the jmagick.jar file into
the directory [java]/jdk/jre/lib/ext
This should work without the need for any code modifications.
The jmagick.dll has to be in a directory that's in your PATH environment
variable. As the imagemagick directory (for example, C:\Program
Files\ImageMagick-6.2.4-Q16) is added to your PATH when you install
image magick, you can just drop the jmagick.dll into this directory.>>
Here is the static code that loads the dll/so library:
The native system library must be in Java library path. Websphere shows its property java.library.path in log files, when it starts.
To add libJmagick.so to library path, I set the system variable LD_LIBRARY_PATH=/usr/lib/jni in Websphere (from server console).
I re-compiled jmagick6.jar in /usr/share/java (because WAS JRE level is 1.5 and jmagick jar was Java 6 level compiled). I put it in my /WEB-INF/lib directory and set "jmagick.systemclassloader" to "no".
Now it seems to work...
Paper jam tastes about as you would expect. Try some on this tiny ad:
global solutions you can do in your home or backyard