$ java -version
java version "1.8.0_121"Java(TM) SE Runtime Environment (build 1.8.0_121-b13)Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
在使用vscode创建spring boot项目的时候,遇到一个问题,就是vscode会提示你
“Java 11 or more recent is required to run. Please download and install a recent JDK”
$ brew info openjdk@11
openjdk@11: stable 11.0.8 (bottled)[keg-only]Development kit for the Java programming language
https://openjdk.java.net/
/usr/local/Cellar/openjdk@11/11.0.8 (650 files, 295.3MB) Poured from bottle on 2020-10-19 at 12:19:32
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/[email protected]License: GPL-2.0
==> Dependencies
Build: autoconf ✔
==> Caveats
For the system Java wrappers to find this JDK, symlink it with
sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk
openjdk@11 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
If you need to have openjdk@11 first in your PATH run:
echo'export PATH="/usr/local/opt/openjdk@11/bin:$PATH"' >> ~/.zshrc
For compilers to find openjdk@11 you may need to set:
exportCPPFLAGS="-I/usr/local/opt/openjdk@11/include"==> Analytics
install: 29,975 (30 days), 70,671 (90 days), 111,102 (365 days)install-on-request: 18,766 (30 days), 30,811 (90 days), 53,043 (365 days)build-error: 0(30 days)
The newly created daemon process has a different context than expected. It won’t be possible to reconnect to this daemon. Context mismatch: Java home is different. Wanted: DefaultDaemonContext[…] Actual: DefaultDaemonContext[…]