
inheritIO causes the output of it to go to the output of the current process which effectively merges stdout and stderr. "-default-ajax-port" (str (:default-ajax-port js-engine))])Īnd then call start in it. "-default-ajax-host" (:default-ajax-host js-engine) My solution in the end was to use ProcessBuilder like this: (defn create-process-builder What's the best way to approach this? Are there any Java libraries to help manage child process in this fashion? Anything in particular I should do from the NodeJS side (I'm very new to NodeJS, I never used it before). Lastly, my app should be able to detect when NodeJS crashed and re-run it or report an error with information. I also want to control where the logs from NodeJS go, as to keep them with the rest of my application. I want to find a random unused one so there's no collisions. I will be talking to NodeJS over HTTP but I don't want NodeJS to open a specific port. This approach, though, brings some issues. I want my library to be self contained, to not depend on the system running NodeJS independently and thus requiring a particular deployment mechanism to place the Java and NodeJS artifacts in the right places to be picked up by the two different network servers. I tried with Nashorn but I encounter some limitations that might be too hard to overcome. This library needs to execute some JavaScript.


I'm writing a Java library, actually, a Clojure library, but for this question, what matters is that it runs on the JVM.
