var java = require("java");
var ArrayList = java.import('java.util.ArrayList');var list = new ArrayList();list.addSync('item1');list.addSync('item2');
console.log(list.sizeSync());
node js.main.js
npm start
"Uncaught Error: Module did not self-register.", source: module.js (354)
I'm not entirely familiar with node-webkit but I believe you have to compile native modules using their tool: https://github.com/rogerwang/node-webkit/wiki/Build-native-modules-with-nw-gyp
let me know if you have any luck and we can add it to the readme.
./compile-java-code.sh
node-gyp configure build
npm test
I thing you just need to run the postInstall.js script in node-java home.