title: How to call a java program from node.js?
body: <p>I have a node.js script and a java program in the same folder (.class and .java and .js). I want to call the java program from the node.js script. In terminal I can call the java program like this</p>
  
  <p><code>java -cp java-json.jar:. PlutoMake "tests/android.png"</code></p>
  
  <p>I saw this thread <a href="https://stackoverflow.com/questions/18815734/how-to-call-java-program-from-nodejs">How to call Java program from NodeJs</a></p>
  
  <p>and I am trying to do the same thing, here is the node.js code</p>
  
  <pre><code>var child = spawn('java', ['-cp java-json.jar:. PlutoMake', 'tests/android.png']);
  </code></pre>
  
  <p>This seems to run without crashing, but then nothing happens. The java program creates an image, but if I do it through node, it doesn't work. Does anyone know whats wrong?</p>
  
  <p>Thanks</p>