jvmsWindows JDK 版本管理器
介紹
JDK Version Manager (JVMS) for Windows
Windows下JDK多版本管理器,類(lèi)似 nvm, nvmw, rvm
這對(duì)JDK不同版本之間切換是非常有用的。例如,如果你想測(cè)試一個(gè)項(xiàng)目你想使用最新最前沿的版本,卻不想卸載JDK的穩(wěn)定版,這個(gè)工具可以很好的解決。
請(qǐng)注意,您需要?jiǎng)h掉以前的JAVA_HOME環(huán)境變量再安裝JVMS。
安裝
- 下載jvms
- 解壓 jvms.zip
- 用管理員身份運(yùn)行cmd或者 powershell ( 在win10快捷鍵為 win + X + A )
- cd 到解壓目錄
- 執(zhí)行 ./jvms.exe init
- 安裝成功!
使用
NAME:
jvms - JDK Version Manager (JVMS) for Windows
USAGE:
jvms.exe [global options] command [command options] [arguments...]
VERSION:
2.0.0
COMMANDS:
init Initialize config file
list, ls List the JDK installations.
install, i Install remote available jdk
switch, s Switch to use the specified version.
remove, rm Remove a specific version.
rls Show a list of versions available for download.
proxy Set a proxy to use for downloads.
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--help, -h show help
--version, -v print the version
以安裝jdk 1.8.0_31為例
1. 用管理員身份運(yùn)行 cmd 或者 powershell ( win + X + A )
2. jvms rls 列出可以在線安裝的jdk版本
3. jvms install 1.8.0_31 安裝 jdk 1.8.0_31
4. jvms ls 列出本地已安裝的jdk版本
5. jvms switch 1.8.0_31 切換jdk 版本為 1.8.0_31
