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
java -cp java-json.jar:. PlutoMake "tests/android.png"
I saw this thread How to call Java program from NodeJs
and I am trying to do the same thing, here is the node.js code
var child = spawn('java', ['-cp java-json.jar:. PlutoMake', 'tests/android.png']);
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?
Thanks