安装
git clone https :// github.com/jenv/jenv.git ~/.jenv
vim ~/.bash_profile
...
# jenv
export PATH="$HOME/.jenv/bin:$PATH"
eval "$(jenv init -)"
zsh
echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(jenv init -)"' >> ~/.zshrc
添加
jenv add /usr/java/jdk1.8.0_261
删除
jenv remove oracle64-1.8.0.151
切换
jenv local 1.8.0.261
检测
jenv doctor #需要将.bash_profile的java_home删掉
全局
jenv global 1.8
查看路径
jenv which java
jenv enable-plugin export
当前shell
jenv shell 1.8
阅读(2974) | 评论(0) | 转发(0) |