title: Trying to execute a Java jar with Runtime.getRuntime().exec()
body: <p>In the project I am working on, I need to execute a script that I have in a resources folder -- in the class path. I am simply testing the final script functionality, since I am on Windows, I needed a way to output a file to STDIN so I created a simple cat.jar program to clone unixs cat command.</p>
  
  <p>So when I do "java -jar cat.jar someFile.txt" it will output the file to stdout. I'm sure there are different ways of doing what I did.</p>
  
  <p>Anyways, 
  I want to run that JAR from my main java program.
  I am doing </p>
  
  <pre><code>Runtime.getRuntime().exec("java -jar C:/cat.jar C:/test.txt");
  </code></pre>
  
  <p>I've tried switching the forward slash to a backward slash and escaping it -- didn't work.
  Nothing is getting sent to standard out.</p>
  
  <p>Where as, if I run the cat jar on its own, I get the file directed to standard out.</p>
  
  <p>What am I doing wrong here?
  Is this enough information?</p>