A cross-platform JDK version management tool that allows you to easily switch between different JDK versions.
- 🚀 Easy JDK version switching
- 💻 Cross-platform support (Windows, Linux, MacOS)
- ⚡️ Simple CLI interface
- 🔧 Easy configuration
- 🎯 Symbolic link based version switching
Please note:
jenv does not automatically download JDKs for you. You need to manually download multiple versions of the JDK and place them in the specified directory.
npm install -g @ringotangs/jenv
- Node.js >= 16.20.2
- Administrator privileges (Windows) or sudo (Linux/MacOS) for creating symbolic links
First time setup:
jenv init
Add your JDK installations:
jenv config
This will guide you through:
- Adding new JDK paths
- Removing existing configurations
- Listing current configurations
View all configured JDK versions:
jenv ls
Change the active JDK:
jenv use
After switching versions, you'll need to configure your environment:
Set environment variables:
JAVA_HOME=<jenv_path>\jdk
Add %JAVA_HOME%\bin to your PATH
Add to ~/.bashrc or ~/.zshrc:
bash
export JAVA_HOME="<jenv_path>/jdk"
export PATH="$JAVA_HOME/bin:$PATH"
Note: Restart your terminal after changing versions to apply the changes.
On Windows, you'll need either:
- Run the command prompt as Administrator, or
- Enable Developer Mode in Windows Settings
This is required for creating symbolic links.
MIT
RingoTangs