title: java.lang.UnsatisfiedLinkError: magick.Magick.init()V Error in Jmagick
body: <p>I have properly installed imagemagick and jmagick and i can convert the below code simple code in terminal by using below command</p>
  
  <p>java -cp  .:/home/user/6.4.0/classes/ JmagickImageResizer convert.jpg desc.jpg</p>
  
  <pre><code>import magick.ImageInfo;
  import magick.MagickImage;
  
  public class JmagickImageResizer {
      public static void main(String args[]){
      try{
          //System.out.println("java.library.path is: " + System.getProperty("java.library.path"));
          ImageInfo origInfo = new ImageInfo(args[0]); //load image info
          MagickImage image = new MagickImage(origInfo);
          image = image.scaleImage(500, 500);
          image.setFileName(args[1]); //give new location
          image.writeImage(origInfo);
          }catch (Exception e) {
              e.printStackTrace();
          }
      }
  }
  </code></pre>
  
  <p>But when i tried the same code inside my application(which runs in tomcat),I have got the below exception while try to resize the image using Jmagick.</p>
  
  <pre><code>Caused by: java.lang.UnsatisfiedLinkError: magick.Magick.init()V
      at magick.Magick.init(Native Method)
      at magick.Magick.&lt;clinit&gt;(Magick.java:40)
      at com.test.ImageResizer.resizeImage(ImageResizer.java:57)
  </code></pre>
  
  <p>P.S: java.library.path has been set in the ~/.bash_profile file.</p>
  
  <p>Any Idea to resolve this issue?</p>