Embed Node.js inside a Java Virtual Machine
This is a set of libraries for running node.js scripts inside Java.
Trireme is specifically designed to be embeddable within any Java program. There is a lot of support inside Trireme for this specific case:
For a more detailed introduction, see our intro presentation:
If neither of those reasons apply to you, then stick with "regular node!"
sudo npm install -g trireme trireme -h trireme
The NPM package for Trireme lets you run it on the command line just like "node".
Unfortunately, Trireme does not support the "repl" yet (and it's hard since Java gives us limited control over the TTY) so just running "trireme" with no arguments produces an error right now.
The best reason to use Trireme is because it's important to embed Node.js code inside an existing Java application. In that case you will use the modules under "io.apigee.trireme" on Maven Central:
The "module map" later in this document shows which modules to use in which cases.
See the releases page to download the latest release files.
"trireme-x.y.z.jar" is always a stand-alone jar that you can run just like "node":
java -jar trireme-x.y.z.jar script.js
Trireme supports two versions of Node.js:
Support for Node.js 4.0 depends on more complete ES6 code in Rhino. The Rhino community is making progress on this but it will be quite some time before we are ready to support 4.0.
If you installed Trireme using NPM, just run: