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 🙏

© 2026 – Pkg Stats / Ryan Hefner

jaer

v1.0.4

Published

For class replace

Readme

Jear

  • Some tools for java developer.

Require

node v14.7.0^
jdk: any

install

    npm i jaer -g

Description

Replace class file in jar file

  • jaer help replace
#jaer help replace
-V, --version              output the version number
-s, --source [source]      Source jar file path
-r, --resource [resource]  Resource absoulte path!
-d, --detail               Whether record the detail msg to file
-m, --message [message]    Human readable message for recording the replacement info or others sth..?
-md5, --md5str [md5str]    Get md5 value of specifically file
-h, --help                 display help for command

Jstack tools

  • jaer help jstack
Usage: jaer jstack|jsk [options]

Help get thred stack info to file

Options:
  -p, --pid [pid]         Pid of your java program!
  -i --interval [number]  Interval time 【second】!
  -t --total [number]     Total times for jstack!
  -d --dir [dir]          Log file local storage dir!
  -n --name [name]        Jstack log file prefix!
  -h, --help              display help for command

Example

Replace class file

  • Step1: put the source jar and replace resource in the same folder like this:
.
├── io
│   └── sth
│       └── detail
│           └── service
│               └── AbcService.class
└── test.jar
  • step2: go to *.jar path, with command cd
  • step3: start replacement with jaer.
  • Replace specifically class file
jaer replace -s test.jar -r io/sth/detail/service/AbcService.class
  • Replace multi class file
# the classes file in path io/sth/detail/service will be all replace into jar.
jaer replace -s test.jar -r io/sth/detail/service
  • Record the replace operation info as log file
jaer replace -s test.jar -r io/sth/detail/service -d -m 'This replacement is for fixe error on jira-xxxx'
# then you will get a file the same directory named 'jaer-replace.jaer'
cat jaer-replace.jaer
# file content
================================================================================
DATE: 2021-01-28 14:58:15
SOURCE: test.jar
RESOURCE: io/sth/detail/service
MD5 (Before replacement): 2587bd377a2d2a20c6d8707ff1b6a2ab
MD5 (After replacement): 2587bd377a2d2a20c6d8707ff1b6a2ab
MESSAGE: This replacement is for fixe error on jira-xxxx
================================================================================
DATE: 2021-01-29 14:58:15
SOURCE: test.jar
RESOURCE: io/sth/detail/service
MD5 (Before replacement): 2587bd377a2d2a20c6d8707ff1b6a2ab
MD5 (After replacement): 2587bd377a2d2a20c6d8707ff1b6a2ab
MESSAGE: This replacement is for fixe error on jira-xxxx
================================================================================

Jstack

  • Get the stace trace info of pid with specifically execute plan.
# Using command jps find out your program's pid
jps

# Using jaer to get stack trace.
jaer jstack -p 76204 -i 1 -t 20 -d /Users/myMac/Desktop/jstack-test

### ouput like follow
 ____  _   _ ____  _____ ____        _   _    _____ ____  
 / ___|| | | |  _ \| ____|  _ \      | | / \  | ____|  _ \ 
 \___ \| | | | |_) |  _| | |_) |  _  | |/ _ \ |  _| | |_) |
  ___) | |_| |  __/| |___|  _ <  | |_| / ___ \| |___|  _ < 
 |____/ \___/|_|   |_____|_| \_\  \___/_/   \_\_____|_| \_\
                                                           
INFO: Stack trace info of process[pid:76204]
INFO: ****PLAN: interval-1,total times: 20,may be cost :20 s
Generate to file /Users/my Mac/Desktop/jstack-test/0_jstack_by_jaer_0.log successful!
Generate to file /Users/myMac/Desktop/jstack-test/0_jstack_by_jaer_1.log successful!
Generate to file /Users/myMac/Desktop/jstack-test/0_jstack_by_jaer_2.log successful!
Generate to file /Users/myMac/Desktop/jstack-test/0_jstack_by_jaer_3.log successful!
Generate to file /Users/myMac/Desktop/jstack-test/0_jstack_by_jaer_4.log successful!
Generate to file /Users/myMac/Desktop/jstack-test/0_jstack_by_jaer_5.log successful!
Generate to file /Users/myMac/Desktop/jstack-test/0_jstack_by_jaer_6.log successful!
Generate to file /Users/myMac/Desktop/jstack-test/0_jstack_by_jaer_7.log successful!
Generate to file /Users/myMac/Desktop/jstack-test/0_jstack_by_jaer_8.log successful!
Generate to file /Users/myMac/Desktop/jstack-test/0_jstack_by_jaer_9.log successful!
Generate to file /Users/myMac/Desktop/jstack-test/0_jstack_by_jaer_10.log successful!
Generate to file /Users/myMac/Desktop/jstack-test/0_jstack_by_jaer_11.log successful!
Generate to file /Users/myMac/Desktop/jstack-test/0_jstack_by_jaer_12.log successful!
Generate to file /Users/myMac/Desktop/jstack-test/0_jstack_by_jaer_13.log successful!
Generate to file /Users/myMac/Desktop/jstack-test/0_jstack_by_jaer_14.log successful!
Generate to file /Users/myMac/Desktop/jstack-test/0_jstack_by_jaer_15.log successful!
Generate to file /Users/myMac/Desktop/jstack-test/0_jstack_by_jaer_16.log successful!
Generate to file /Users/myMac/Desktop/jstack-test/0_jstack_by_jaer_17.log successful!
Generate to file /Users/myMac/Desktop/jstack-test/0_jstack_by_jaer_18.log successful!
Generate to file /Users/myMac/Desktop/jstack-test/0_jstack_by_jaer_19.log successful!
==================== 20/20
INFO: All done! Successfuy get stack trace info of process[pid:76204]