
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
node-java-bridge
Advanced tools
bridge API for node-java repository
This API allows you:
call static method easily without knowing class path
create java instance with "new" keyword
npm install node-java-example
or
yarn add node-java-example
1. Configure java path(for jar command).
if there is no jdk installation, you can also put jar file into your project,
and add following scripts:
process.env.Path += ';<your_jar_path>';
Import module
Load All Jar Classes
Limitation: if jar is too large, it will throw array size exceed error.
nodeJavaBridge.load(jarPath, {sync: true}) .then((api) => { console.log('---- Instance ----'); console.log(api.Base); var b1 = new api.Base(); console.log(b1.call('my arg'));
console.log('---- End of Instance ----');
console.log('---- Static Methods ----');
console.log(api.Main.Foo());
console.log('---- End of Static Methods ----');
}, (err) => { console.log('Error'); console.log(err); }) .catch((err) => { console.log('---- Catch ----'); console.log(err); });
Load part of jar
nodeJavaBridge.addClassPath('./Main.jar'); var Main = nodeJavaBridge.loadJarModuleAsync('com/example/api/Main'); console.log(Main);
console.log('---- dumpMethods ----'); console.log(nodeJavaBridge.getClassMethods('com.example.api.instance.Concrete')); console.log('---- End of dumpMethods ----');
Github: node-java
FAQs
NodeJS java bridge API
The npm package node-java-bridge receives a total of 3 weekly downloads. As such, node-java-bridge popularity was classified as not popular.
We found that node-java-bridge demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.