Wednesday, July 16, 2014

Executing windows commands through java

I wanted to start the node server programmatically.
>node app.js


Using Java:

String executePath = "cmd /c start node app.js"

Runtime.getRuntime().exec(executePath);


No comments:

Post a Comment