npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

javawebstart

v1.1.0

Published

A module for running JNLP files or urls

Downloads

2

Readme

Node.js CI

About

This is a NodeJS utility & library for running Java Web Start pacages with a java version that does not (no longer) include the javaws feature. The utility is written in TypeScript, and comes packaged an installable as an NPM package.

Why this tool?

At some point I found myself without a suitable Java runtime that could still run a Java Web Start package, which I needed in order to validate some files to be uploaded to the tax administration. Checking the JNLP file and running the tool manually was easy enough, but I still felt... a new tool could come in handy... so here we are...

Features

  • Downloading a JNLP specified from an http or https url
  • Using a locally stored JNLP file
  • Parsing the downloaded/read JNLP file
  • Downloading the JNLP jar file, with a progress bar
  • Caching a JNLP jar file (auto check for newer version)
  • Running the JNLP from the downloaded or cached Jar file
  • Interrupting The running Java process when the Node process is interrupted
  • Redirecting java stdout, stderr to the Node process
  • Redirecting Node stdin, to the Java process
  • Verfifying the Jar signature using jarsigner (if installed)

Dependencies

  • A suitable version of Java must be installed on your system.
  • A suitable JDK must be installed in order to be able to use the jarsigner validation
  • This library uses the libxmljs2 and cli-progress libraries.

Installing

npm -g install javawebstart

Usage

# If locally installed via npm install  -g
javawebstart <jnlp-url> [--trust]

# Via NPX
npx -g javawebstart <jnlp-url>

API

It is possible to use this module as an API as well.

// Import the main class of the library
import {JavaWebStart} from "javawebstart";

// Download a remote or local JNLP file
let starter = await JavaWebStart.downloadJNLP(jnlpUrl);

// OR use existing XML
starter = new JavaWebStart(myJNLPXml);

// Optionally, await the download first or only
// await starter.download();

// Or just run (potentially with options)
await starter.run();

Run options

The run method can taken an options object, with the following optional properties:

  • Explicitly trust the jar
  • A jar location
  • An alternative 'WritableStream' for
    • stdout
    • stderr
  • An alternative `ReadableStream' for the reading input

Credits

cli-progress

Copyright (c) 2015-2020 Andi Dittrich (MIT LICENSE)

LICENSE

libxmljs2

Copyright 2009, Squish Tech, LLC. All rights reserved.

LICENSE

Disclaimer

Java Web Start It is up to you to validate if the JNLP and jar file you wish to run come from a trusted source. I can not be held liable for ANY damage that might occur from using this utility. There is no warranty whatsoever.