MAC电脑安装openJdk
一、安全brew软件
[1]安全命令地址:https://brew.sh/index_zh-cn
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
[2] 如命令无法使用则需要改host:https://blog.csdn.net/txl910514/article/details/105880125
macOS安装Homebrew时总是报错(Failed to connect to raw.githubusercontent.com port 443: Connection refused)
原因:由于某些你懂的因素,导致GitHub的raw.githubusercontent.com域名解析被污染了。
解决办法:通过修改hosts解决此问题。
查询真实IP
在https://www.ipaddress.com/查询raw.githubusercontent.com的真实IP。
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
sudo vim /etc/hosts 添加内容如下: 199.232.28.133 raw.githubusercontent.com
二、安装open-jdk
https://www.jianshu.com/p/8e82d7429528