要打开“STS”,您需要安装旧版 Java SE 6 运行时

To open “STS” you need to install the legacy Java SE 6 runtime

我刚刚下载了最新版本的 Spring Tool Suite (v3.9.5) for MacOS (High Sierra v.10.13.2) 和当 运行 STS 我收到此错误: To open “STS” you need to install the legacy Java SE 6 runtime.

当我检查我的 mac 上安装的 Java 版本时,我得到:

$ java --version
No Java runtime present, requesting install.

Eclipse 和旧版 MacOS 的类似问题:

To open "Eclipse" you need to install the legacy Java SE 6 runtime

Eclipse 中的错误: https://bugs.eclipse.org/bugs/show_bug.cgi?id=475640

不要下载旧版 Java

转到 Oracle 并安装 最新的 JDK

在终端验证:

$ java -version
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)

STS 即将开始。