New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jarfile

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jarfile

Get information about a jar file

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-80%
Maintainers
1
Weekly downloads
 
Created
Source

jarfile Build Status

A Node.js module for getting information about a jar file.

Synopsis

Want to know something about what is going on in a jar file? This module may help!

Caveats

Currently this module can only tell you about manifest entries. If there's other stuff worth knowing about the contents of a jar file, feel free to submit a pull request!

Installation

npm install jarfile

Example

var jarfile = require("jarfile")

// Get the Main-Class entry from foo.jar.
jarfile.fetchJarAtPath("foo.jar", function (err, jar) {
    console.log(jar.valueForManifestEntry("Main-Class"))
})

Functions

jarfile.fetchJarAtPath(path, callback)

Reads information from the jar file at the given path, and passes the following to the callback:

  • An error if there was an error reading the jar file or its manifest.
  • A Jar object. See the methods below for what to do with this object.

Note that this function caches Jar objects and doesn’t make any attempts to ensure the underlying file has not changed.

Jar.prototype.valueForManifestEntry([sectionName], entryName)

Returns the string value for the given entry’s name. If you’re looking for an entry in a particular section, specify the section’s name as the first argument. If the section or entry does not exist in the manifest, null is returned.

Keywords

FAQs

Package last updated on 20 Oct 2018

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