A simple and easy-to-use Java version manager(registry: jvr), similar to Node.js's nvm,but it does not follow nvm's naming convention. Otherwise, it would benamed 'jvm', which could cause command conflicts or ambiguity.
APACHE-2.0 License
jvr
A simple and easy-to-use Java version manager(registry: jvr
), similar to Node.js
's nvm
,
but it does not follow nvm
's naming convention. Otherwise, it would be named jvm
,
which could cause command conflicts or ambiguity.
Install
Download executable
Download the executable file directly from GitHub
and put it in any $PATH
path.
Cargo
cargo install --git https://github.com/photowey/jvr.git [--branch main]
Usage
Commands
Add
Register JDK
$ jvr add -h | --help
$ jvr add <NAME> <PATH>
# e.g.:
$ jvr add jdk8 ${YOUR_PATH}/jdk8
$ jvr add jdk11 ${YOUR_PATH}/jdk11
$ ...
List
List all registered JDK
s, and use a clear table to list the registrations. The *
indicates the version currently in use.
$ jvr list
Use
Switch the JDK
version and automatically update the user's JAVA_HOME
environment variable.
$ jvr use <NAME>
# e.g.:
$ jvr use jdk11
Version
View the version of jvr
itself.
Open
Open the directory where jvr
HOME
is located, if applicable.