title: How to run a Java program under cron and import the jars
body: <p>My source file is <code>.../MyDir/proj/myProj.java</code>. The jar files are under <code>.../MyDir/proj/library</code>. The jar files are from <a href="http://sourceforge.net/projects/htmlunit/files/" rel="nofollow">HTMLUnit 2.10</a>.</p>
  
  <p>This is the source for my cron file:</p>
  
  <pre><code>0 0 * * * java -classpath .../MyDir/proj/ myProj
  </code></pre>
  
  <p>But it gave me the error:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: com/gargoylesoftware/htmlunit/WebClient
  </code></pre>
  
  <p>How do I modify the cron file to import the jar files?</p>