赞
踩
HomebrewCN: Homebrew 国内安装脚本,快速部署 brew ,国内镜像https://gitee.com/cunkai/HomebrewCN
查看macos的架构:终端输入 uname -a,看显示结果。
等待安装完成后控制台会有下列语句:
- For the system Java wrappers to find this JDK, symlink it with
- sudo ln -sfn /opt/homebrew/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk
-
- openjdk@11 is keg-only, which means it was not symlinked into /opt/homebrew,
- because this is an alternate version of another formula.
-
- If you need to have openjdk@11 first in your PATH, run:
- echo 'export PATH="/opt/homebrew/opt/openjdk@11/bin:$PATH"' >> ~/.zshrc
-
- For compilers to find openjdk@11 you may need to set:
- export CPPFLAGS="-I/opt/homebrew/opt/openjdk@11/include"
在控制台依次执行上面3条语句后,使用Java -version检查Java是否安装成功。
2.2 安装maven:brew install maven 默认安装最新版本。
等待执行完成后使用mvn -v 检查是否安装成功,同时可以看到本机maven安装地址。
在配置maven环境时,根据上述方法安装的maven无法通过鼠标点击找到,通过command + shift + g命令直接将maven地址复制在搜索栏即可选择想要配置的maven。
- <settings>
- ...
- <mirrors>
- <mirror>
- <id>alimaven</id>
- <name>aliyun maven</name>
- <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
- <mirrorOf>central</mirrorOf>
- </mirror>
-
- </mirrors>
- ...
- </settings>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。