mac下载jdk11 + vscode
https://www.oracle.com/download
我们下载tar.gz包.
mv ~/Desktop/jdk11 /Library/Java/JavaVirtualMachines
编辑环境变量:
vim ~/.bash_profile
# 设置 jdk 8
export JAVA_8_HOME=`/usr/libexec/java_home -v 1.8`
# 设置 jdk 11
export JAVA_11_HOME="$(/usr/libexec/java_home -v 11)"
不说了 还是这篇博客丰富
https://www.jianshu.com/p/6273e7ab0c56
之后到:
vscode marketplace 下载sonarlint。
在左上角code->perferences->settings
搜索sonarlint
找到:Sonarlint>Ls:Java Home
填入自己的jdk目录
/Library/Java/JavaVirtualMachines/jdk11/contents/Home
Restart.