title: Runtime.getRuntime().exec(cmd) with JSPs
body: <p>I have a class with a method that works just find when I run it from the command line. Nothing seems to happen when I call it in a JSP file though. Could I be missing something here? Are there some configuration changes I need to make to have this code working.</p>
  
  <pre><code>public static void toText(String pdfFile, String textFile) {
      try {
          String[] cmd = {"pdftotext", pdfFile, "/tmp/text1984.txt"};
          Process p = Runtime.getRuntime().exec(cmd);
          p.waitFor();
      } catch (Exception e) {
          System.out.print(e.getMessage());
      }
  }
  </code></pre>
  
  <p>Regards,
  Phiri</p>