Java Development Kit Version Manager
$ npm install -g jvm
$ jvm COMMAND
running command...
$ jvm (--version)
jvm/0.0.0 darwin-arm64 node-v22.14.0
$ jvm --help [COMMAND]
USAGE
$ jvm COMMAND
...jvm currentjvm doctorjvm initjvm install VERSIONjvm listjvm uninstall VERSIONjvm use VERSIONjvm which
Show currently active JDK version
USAGE
$ jvm current [-v] [--java-home]
FLAGS
-v, --verbose Show detailed information about current JDK
--java-home Show only JAVA_HOME path
DESCRIPTION
Show currently active JDK version
EXAMPLES
$ jvm current
Current JDK version: 17.0.9 (OpenJDK)
JAVA_HOME: /usr/lib/jvm/java-17-openjdk
$ jvm current --verbose
Current JDK version: 17.0.9 (OpenJDK)
JAVA_HOME: /usr/lib/jvm/java-17-openjdk
Vendor: Eclipse Temurin
Architecture: x64
Location: /opt/jvm/versions/17.0.9
See code: src/commands/current.ts
Diagnose JDK installation and configuration issues
USAGE
$ jvm doctor
DESCRIPTION
Diagnose JDK installation and configuration issues
EXAMPLES
$ jvm doctor
🩺 JDK Health Check Report
==========================
✓ JDK Manager Installation: OK
✓ System Java Detection: OK
⚠️ JAVA_HOME Environment: Not set globally
✓ PATH Configuration: OK
✓ Installed JDKs: 3 versions found
✗ Default JDK: Not configured
Recommendations:
- Set JAVA_HOME globally
- Configure a default JDK version
See code: src/commands/doctor.ts
Initialize JDK version manager for the current project
USAGE
$ jvm init [-v <value>] [-g]
FLAGS
-g, --global Initialize global JDK configuration
-v, --version=<value> JDK version to use for this project
DESCRIPTION
Initialize JDK version manager for the current project
EXAMPLES
$ jvm init
✓ Created .jdkrc file
✓ Configured project to use JDK 17.0.9
$ jvm init --version 21
✓ Created .jdkrc file
✓ Configured project to use JDK 21.0.1
See code: src/commands/init.ts
Install a specific JDK version
USAGE
$ jvm install VERSION [-d] [-f] [-v <value>]
ARGUMENTS
VERSION JDK version to install (e.g., 17, 21, 8.0.392)
FLAGS
-d, --set-default Set this version as the default after installation
-f, --force Force installation even if version already exists
-v, --vendor=<value> [default: temurin] JDK vendor (oracle, openjdk, temurin, etc.)
DESCRIPTION
Install a specific JDK version
EXAMPLES
$ jvm install 17
Installing JDK 17...
✓ JDK 17.0.9 installed successfully
$ jvm install 21 --set-default
Installing JDK 21...
✓ JDK 21.0.1 installed successfully
✓ Set as default JDK version
See code: src/commands/install.ts
List available JDK versions
USAGE
$ jvm list [-r] [-i]
FLAGS
-i, --installed Show only installed versions
-r, --remote Include remote versions available for download
DESCRIPTION
List available JDK versions
EXAMPLES
$ jvm list
Available JDK versions:
8.0.392
11.0.21
* 17.0.9 (currently active)
21.0.1
$ jvm list --remote
Available JDK versions (including remote):
8.0.392
11.0.21
* 17.0.9 (currently active)
21.0.1
22.0.0 (remote)
See code: src/commands/list.ts
Remove a JDK version
USAGE
$ jvm uninstall VERSION [-f] [--keep-config]
ARGUMENTS
VERSION JDK version to uninstall (e.g., 17, 21, 8.0.392)
FLAGS
-f, --force Force uninstall without confirmation
--keep-config Keep configuration files after uninstall
DESCRIPTION
Remove a JDK version
EXAMPLES
$ jvm uninstall 17
Are you sure you want to uninstall JDK 17.0.9? (y/N) y
✓ JDK 17.0.9 uninstalled successfully
$ jvm uninstall 21 --force
✓ JDK 21.0.1 uninstalled successfully (forced)
See code: src/commands/uninstall.ts
Switch to a specific JDK version
USAGE
$ jvm use VERSION [-g] [-l]
ARGUMENTS
VERSION JDK version to switch to (e.g., 17, 21, 8.0.392)
FLAGS
-g, --global Set JDK version globally for all projects
-l, --local Set JDK version only for current project
DESCRIPTION
Switch to a specific JDK version
EXAMPLES
$ jvm use 17
✓ Switched to JDK 17.0.9
$ jvm use 21 --global
✓ Switched to JDK 21.0.1 (global)
See code: src/commands/use.ts
Show the path to the specified JDK version
USAGE
$ jvm which [-v <value>] [-h] [-b]
FLAGS
-b, --bin Show bin directory path
-h, --home Show JAVA_HOME path instead of executable
-v, --version=<value> JDK version to locate (defaults to current)
DESCRIPTION
Show the path to the specified JDK version
EXAMPLES
$ jvm which
/opt/jvm/versions/17.0.9/bin/java
$ jvm which 21
/opt/jvm/versions/21.0.1/bin/java
$ jvm which --home
/opt/jvm/versions/17.0.9
See code: src/commands/which.ts