EzDevInfo.com

nodyn

A node.js compatible framework running on the JVM. Node.js API for the JVM

Does nodyn invoke node.js as another process?

I am looking for solution to execute JavaScript in JVM, but without invoking another process - I need everything to be exclusively in the JVM process.

One option that seemed promising is nodyn (embedded), but I was unable to figure out if launches another process or not. The example they give online in their readme file seems to be a process invocation "look alike". Especially suspicious is the -e parameter which is compatible with the nodyn binary as well.

NodynConfig config = new NodynConfig( new String[] { "-e", SCRIPT } );
// Create a new Nodyn and run it
Nodyn nodyn = factory.newRuntime(config);
...
int exitCode = nodyn.run();

My questions:

  1. Does nodyn/dynjs invoke another process or not?
  2. Is nodyn jar, for embedding in JVM, dependent on the nodejs binary or nodyn binary?

Source: (StackOverflow)