title: shell script fails when executed by cronjob, works fine otherwise
body: <p>I have an executable jar and I have written a shell script to execute it. When I run the shell script manually, it runs fine but when schedule to run it weekly using crontab, it gives the following error - </p>
  
  <pre><code>log_process.sh: line 16: java: command not found
  </code></pre>
  
  <p>Line 16 in my shell script is - </p>
  
  <pre><code>java -jar $jar_path $logDirectory $logNamePattern $processedLogDirectory $oldResultsDirectory 2&gt;&gt;$log_file 1&gt;&amp;2
  </code></pre>
  
  <p>Any idea why is it happening that it runs fine when I run it manually but not when it gets run by vrontab job?</p>