Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

npm-java-runner

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-java-runner

[![NPM](https://img.shields.io/npm/v/npm-java-runner.svg?style=flat-square)](https://www.npmjs.com/package/npm-java-runner)

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.3K
decreased by-0.02%
Maintainers
1
Weekly downloads
 
Created
Source

NPM Java Runner

NPM

  • Include configured jar inside the NPM-package.
  • Provide a layer, delegating all arguments, so that the jar is runnable with npx.

So that you can create a command line tool with Java and distribute it as an NPM package.

Usage

Create an index.js with:

#!/usr/bin/env node
require('npm-java-runner/lib/index').run(__dirname);

Create package.json with:

{
  "name": "NAME",
  "runnable-jar-regexp": ".*build/libs/.*\\d+\\.\\d+\\.\\d+\\.jar",
  "files": ["build/libs"],
  "bin": "./index.js",
  "dependencies": {
    "npm-java-runner": "a.b.c"
  }
}

If you release this (npm publish), you will be able to run your jar with:

npx NAME --whatever arguments

Examples

Keywords

FAQs

Package last updated on 01 Sep 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc