无法安装 Eclipse - 在 Mac 上“无法创建 Java 虚拟机”

2022-09-01 17:56:50

我正在尝试安装 Eclipse,但无法启动安装程序。它失败

“未能创建 Java 虚拟机”

如何解决此问题?

注意:我使用的是 Mac。


答案 1

编辑文件 /Applications/Eclipse.app/Contents/Info.plist

有一个注释用于使用特定的JVM:

<key>Eclipse</key>
<array>
    <!-- to use a specific Java version (instead of the platform's default) uncomment one of the following options,
        or add a VM found via $/usr/libexec/java_home -V -->
    <string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk8u192-b12/Contents/Home/jre/</string>
    <string>-keyring</string>
    <string>~/.eclipse_keyring</string>
</array>

答案 2

我也花了一些时间来弄清楚这一点。主要结论是eclipse不支持SDK版本14(截至eclipse 2020-03)。这对我来说并不完全明显。

  1. 安装受支持的版本(我使用 Homebrew 安装 SDK V8


推荐