title: Using Runtime.getRuntime().exec() to run perl code in java
body: <p>I have a perl script called pbp that takes an html file as an argument and then creates an output file. Here is my current code. Infile is obtained earlier from a JFile Chooser. I don't get any errors but there is no ouput from the perl script. </p>
  
  <pre><code>try {
              Process p = Runtime.getRuntime().exec(new String[] {"perl", "C:\\Users\\Roger\\Downloads\\The_Long-Awaited_Product_Specification_and_Sample_Files\\casey\\pbp", inFile.getAbsolutePath()});
              p.getInputStream().close();
              p.getOutputStream().close();
              p.getErrorStream().close();
              System.out.println(p.waitFor());
          } catch (IOException e1) {
              // TODO Auto-generated catch block
              e1.printStackTrace();
          } catch (InterruptedException e1) {
              // TODO Auto-generated catch block
              e1.printStackTrace();
          }
  </code></pre>