This module is known to work with DynJS, and has been briefly tested on Nashorn, and should work with Rhino as well.
Using the global
load() functions supplied by DynJS, Nashorn and
jvm-npm.js into the global execution context:
dynjs> load('./jvm-npm.js'); dynjs> var x = require('some_module');
Or with Nashorn:
nashorn> load('./jvm-npm.js'); nashorn> var x = require('some_module');
Of course, you will need to ensure that the jvm-npm.js file exists in the current directory.
examples directory for simple, runnable usage examples.
Again, this will only work out of the box for pure JS NPM modules.
Anything that depends on the Node.js API will not work with just