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

jvs-manager

v0.0.2

Published

A tool to switch Java versions using symbolic links

Downloads

7

Readme

Java Version Switcher (jvs)

一个简单的命令行工具,用于在 Windows 系统上管理多个 Java 版本。使用符号链接(Symbolic Links)来实现版本切换。 早上用tauri的时候他告诉我要用java17但是我安装了三个版本的java但是却没有好用版本切换工具,这这这,自己写一个吧。

安装

npm install -g jvs-manager

使用方法

初始化

首先需要初始化工具:

jvs init

初始化过程会自动设置必要的环境变量。 初始化后建议重启下这个命令行

列出所有可用的 Java 版本

jvs list

添加新的 Java 版本

jvs add <version-name> <java-installation-path>

例如:

# 在 Nu shell 中(推荐)
jvs add jdk-17 'C:/Program Files/Java/jdk-17'

# 在 CMD 或 PowerShell 中
jvs add jdk-17 "C:\Program Files\Java\jdk-17"

切换到指定的 Java 版本

jvs use <version-name>

例如:

jvs use jdk-17

删除 Java 版本

jvs remove <version-name>

例如:

jvs remove jdk-17

工作原理

  1. 工具会在用户主目录下创建两个文件夹:
    • .java-versions:存储所有 Java 版本的符号链接
    • java-link:包含一个 current 符号链接,指向当前使用的 Java 版本
  2. 环境变量 JAVA_HOME 指向 java-link/current
  3. 切换版本时,只需要更改 current 符号链接的指向即可
  4. 由于使用了固定的环境变量路径,切换版本后不需要重新设置环境变量

注意事项

  • 爷只在windows测试过其它系统想用自己测试去
  • 需要管理员权限来创建符号链接和设置环境变量
  • 确保添加的 Java 安装路径是有效的
  • 建议使用有意义的版本名称,如 jdk-17jdk-11
  • 在 Nu shell 中,必须使用单引号来包裹路径,并使用正斜杠:
    jvs add jdk-17 'C:/Program Files/Java/jdk-17'
  • 在 CMD 或 PowerShell 中,使用双引号和反斜杠:
    jvs add jdk-17 "C:\Program Files\Java\jdk-17"