Manage multiple JDK versions easily on Windows/macOS/Linux.
JVMS is a JDK version manager designed for Windows, macOS, and Linux, making it simple to install and switch between multiple JDK versions on the same machine.
- ✅ Multi-version management - Install and manage multiple JDK versions on one machine
- 🔄 Fast switching - Switch JDK versions instantly without rebooting
- 📦 Multi-source support - Download JDK builds from multiple mirrors
- Tsinghua University Open Source Software Mirror
- Lanzhou University Mirror
- injdk
- Adoptium (Eclipse Temurin)
- Azul Zulu
- Huawei Cloud OpenJDK Mirror
- 🎯 Smart detection - Identify your system architecture and download the matching build automatically
- 🚀 Zero dependencies - Written in Go, no JDK required beforehand
- 🔗 Symbolic links - Use symlinks so every terminal picks up the change immediately
- 🏠 Local versions - Add locally downloaded JDK archives
- 🌐 Custom sources - Configure private download servers
During development you may need to:
- Test project compatibility across different JDK versions
- Run projects that require a specific JDK
- Try new JDK features without disturbing your stable setup
- Switch quickly between legacy and cutting-edge versions
JVMS makes it all effortless!
-
Download the latest release
- Visit the Releases page
- Download the newest
jvms.zip
-
Extract and configure
# Extract the zip file to your preferred location, for example: C:\jvms # Tip: choose a stable location and avoid moving it frequently
-
Initialize JVMS
# Run as administrator cd C:\jvms jvms.exe init -
Done!
After initialization, JVMS configures the environment variables automatically. Reopen your terminal to start using it.
NAME:
jvms - Cross-platform JDK version manager
USAGE:
jvms.exe [global options] command [command options] [arguments...]
VERSION:
2.0.0
COMMANDS:
init Initialize configuration files
list, ls List installed JDK versions
install, i Install a remote JDK version
switch, s Switch to a specific JDK version
use, u Temporarily use a version for the current session
remove, rm Remove a JDK version
rls Show available JDK versions
proxy Configure a download proxy
help, h Show command list or help for a command
GLOBAL OPTIONS:
--help, -h Show help
--version, -v Print version information
# Show the first 10 available versions
jvms rls
# Show all available versions
jvms rls -aOutput example:
Loading version list from local cache...
1) openjdk-25
2) openjdk-24.0.2
3) openjdk-23.0.2
4) openjdk-22.0.2
5) openjdk-21.0.2
6) openjdk-20.0.2
7) openjdk-19.0.2
8) openjdk-18.0.2.1
9) openjdk-17.0.2
10) openjdk-16.0.2
Use "jvm rls -a" to display all versions
# Run as administrator
$ jvms install 17.0.6
# Or install a named version
$ jvms install openjdk-21
Loading version list from local cache...
Downloading JDK version openjdk-21.0.2...
201.33 MB / 201.33 MB [=================================] 100.00% 6.19 MB/s 32s
Done
Installing JDK openjdk-21.0.2 ...
Installation finished successfully. To use this version, run: jvms switch openjdk-21.0.2Download speed jumped from 50+ KB/s to 6+ MB/s (same broadband, 100x faster)
jvms list
# or shorthand
jvms ls# Global switch (affects all new terminals)
jvms switch 17.0.6
# Temporarily switch for the current session
jvms use 21.0.4java -versionIf you already have a JDK, you can add it manually:
- Locate the JVMS installation directory (for example:
C:\jvms) - Enter the
storesubdirectory - Copy the JDK folder into
store - Rename it to the version number (for example:
17.0.1) - Run
jvms listto confirm - Run
jvms switch 17.0.1to switch versions
Directory structure example:
C:\jvms\
├── jvms.exe
├── config.json
└── store\
├── 17.0.1\
│ ├── bin\
│ ├── lib\
│ └── ...
└── 21.0.4\
├── bin\
├── lib\
└── ...
If you need to download through a proxy:
jvms proxy http://proxy.example.com:8080Ideal for corporate intranets or customized JDK builds.
1. Create an index file
Create an index.json file:
[
{
"version": "17.0.10-custom",
"url": "http://192.168.1.100/jdk/jdk-17.0.10-custom.zip"
},
{
"version": "21.0.2-internal",
"url": "http://192.168.1.100/jdk/jdk-21.0.2-internal.zip"
}
]2. Deploy to an HTTP server
Place jdkdlindex.json and the JDK zip files on Nginx, Apache, or any static file server.
3. Configure JVMS
jvms initOptional: customize the JAVA_HOME path
jvms init --java_home D:\MyJDK4. Use the private source
jvms rls # List JDK versions provided by the private source
jvms install 17.0.10-custom # Install a version from the private sourceCreate a JDK zip package:
- Open the JDK installation directory (contains
bin,lib, etc.) - Select all files and folders
- Compress them into a
.ziparchive (do not include the outer folder) - Upload the archive to your server
- Add the corresponding link in
index.json
Managing multiple JDK versions usually comes down to two approaches:
-
Modify the PATH environment variable - Update PATH each time you switch or rely on batch scripts
- ❌ Requires restarting the terminal to take effect
- ❌ Complex to implement and error-prone
-
Use symbolic links (the JVMS approach) - Keep a symlink in PATH and update its target when switching
- ✅ Every terminal reflects the change immediately, no restart needed
- ✅ Simple and reliable implementation
- ✅ Persists across system reboots
- During initialization:
jvms initcreates symbolic links and adds them to PATH - When switching:
jvms switch x.x.xupdates the symlink target - No administrator afterward: switching requires admin privileges, but only needs to run once per switch
This approach keeps things convenient while maximizing performance and stability.
JVMS automatically fetches JDK builds from the following mirrors:
- Official OpenJDK distribution
- Long-term support (LTS) releases
- Enterprise-grade quality assurance
- OpenJDK builds provided by Azul Systems
- Supports multiple platforms and architectures
- Offers commercial support options
- Domestic mirror with fast download speeds
- Automatically detects system architecture (amd64/arm64)
- Supports JDK 9 through JDK 25
JVMS automatically filters versions that match your current system (Windows/amd64), so there is no need to pick manually.
A: No. JVMS is written in Go and runs independently.
A: No. With symbolic links, every open terminal reflects the change instantly.
A: Yes. Install multiple versions, then use jvms switch to change globally or jvms use for the current session.
A: Delete the JVMS installation directory and manually clean any JAVA_HOME entries from your PATH.
A: Windows 7 or later (administrator privileges are required to create symbolic links).
A: Windows requires administrator rights to create symbolic links. You only need them for jvms init and jvms switch.
- Language: Go
- Dependency management: Go Modules
- HTML parsing: golang.org/x/net/html
Contributions via Issues and Pull Requests are welcome!
- Fork this repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
See Releases for the version history.
This project is inspired by the Node.js community's NVM (Node Version Manager) and optimized for Windows and JDK workflows.
MIT License
Copyright (c) 2024 JVMS Contributors
See the LICENSE file for details.
If JVMS helps you, please give us a ⭐️ Star!