Can we achieve starting a nodejs/phantomjs script from java rest api?
I have tried this:
rt = Runtime.getRuntime();
p = rt.exec("node /extra/POC/index.js 14");
p.waitFor();
It is able to start but my java process is keep running until my script execution completes as using p.waitFor();
my script internally has conditions to do process.exit();
and i don't want java to wait till this script execution completed.
Java should just invoke the script and leave it and let index.js
script will take care of remaining job.