title: convert command not found when shell script is run through java
body: <p>I have a shell script that performs OCR. It has an image magick convert command. The shell script is running fine when run directly but when the shell script is executed through java program, the convert command is not found. I have simplified the shell script for testing purpose. This is my shell script - </p>
  
  <pre><code>#!/bin/bash
  
  LOGFILE=/opt/apache-tomcat-9.0.12/bin/test14.log
  
  (
   FILE_NAME=$1;
   convert $FILE_NAME -density 6000 -resize "2000x" DENSE_$FILE_NAME;
  ) &gt;&amp; $LOGFILE
  </code></pre>
  
  <p>and this is what gets printed in the test14 log file - </p>
  
  <pre><code>line 7: convert: command not found
  </code></pre>
  
  <p>Please let me know what i'm doing wrong.</p>