@sidalihallak/node-jre-extra
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

node-jre-extra

NPM version

This module will embed the Java Runtime Environment (JRE) into a Node.js app. It will download the platform specific JRE at installation time. Afterwards the embedding app can be bundled into a platform specific package. This package would not require any further JRE installation steps by users.

Usage

After install the package, you can install JRE with specific version:

# Install JRE 8
$ npx node-jre-extra install

# Install JRE with specific version, for example: 11
$ npx node-jre-extra install -v 11

After installed, you can work with JRE for now:

import { getJavaBin } from 'node-jre-extra'
import { $ } from 'execa'

const jarPath = 'hello.jar'
const javaBin = await getJavaBin()
const result = await $`${javaBin} -jar ${jarPath}`
console.log(result)

Build & Publish

  • npm run build
  • npx changeset
  • npx changeset version
  • git commit
  • npx changeset publish
  • git push --follow-tags

changeset prerelease doc

Credit

License

MIT License © 2022 Yuns

/@sidalihallak/node-jre-extra/

    Package Sidebar

    Install

    npm i @sidalihallak/node-jre-extra

    Weekly Downloads

    1

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    6 kB

    Total Files

    4

    Last publish

    Collaborators

    • sidalihallak