title: Hadoop JAR command - Setting java.library.path
body: <p>I'm trying to run a java program on Hadoop cluster. Here's the command- </p>
  
  <pre><code>export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:/usr/local/lib/*:/home/rgupta/bdAnalytics/lib/*
  hadoop jar $jarpath bigdat.twitter.queue.TweetOMQSub &gt;  $logsFldr/subsHdpOMQ_$1.log 2&gt;&amp;1 &amp;
  #java -Djava.library.path=/usr/local/lib -classpath  class/:lib/:lib/jzmq-2.1.3.jar  bigdat.twitter.queue.TweetOMQSub &gt; log/subsFilterOMQ_$1.log 2&gt;&amp;1 &amp;
  </code></pre>
  
  <hr>
  
  <p>This throws following error -</p>
  
  <pre><code>Exception in thread "main" java.lang.UnsatisfiedLinkError: no jzmq in java.library.path
  </code></pre>
  
  <p>If I use the Java native command above, it works fine. Also, the hadoop node where I m trying to test it, does have the necessary jzmq jars under /usr/local/lib directory. Is there a way I can set java.library.path to Hadoop JAR command.
  Please suggest how can I fix this. </p>