JAVAinstallation

JAVA INSTALATION_高级程序设计语言 B

1.下载Java、jenv

首先,请用homebrew下载javajenv

1
2
brew cask install java
brew install jenv #Java的管理工具

(中途需要输入密码)



2. 初始化jenv

为初始化,请在shell里加以下code:

~/.zshrc(本人iTerm默认shell是zshshell,用bash shell的请用~/.bash_profile

1
2
3
4
5
6
7
#zsh
export PATH="$HOME/.jenv/bin:$PATH"
eval "$(jenv init -)"

#bash
if which jenv > /dev/null; then eval "$(jenv init -)"; fi



3. 把下载的Java添加到jenv管理项目

请在各自的电脑找openjdk-版本数组文件,复制文件地址

在这个地步要注意一件事:为复制文件地址要摁 ‘optkey‘

然后请在shell里写这一句:

1
jenv add 复制路径


4. Jenv version check & Code





Donate
  • Copyright: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
  • Copyrights © 2020 GwenChanEn
  • Visitors: | Views:

Do you like my writing? Would you coffee me?

支付宝
微信