雙擊 eclipse.exe 彈窗報錯:
Could not create the Java Virtual Machine.
A fatal exception has occurred. Program will exit.
Eclipse 4.6 (Neon) 最低要求 JDK 1.8。若系統 PATH 中優先找到 JDK 1.7 或更低版本,啟動器無法創建 JVM。
cmd> eclipse -vm // 輸出將顯示 Eclipse 嘗試使用的 JVM 路徑及版本
java -version 輸出 1.8.x。-vm C:/Program Files/Java/jdk1.8.0_202/bin/jvm.dll // 必須放在 -vmargs 之前,路徑指向 jvm.dll(而非 java.exe)
As shown above, Eclipse 4.6 requires at least a Java SE 8. Perhaps an older version of the VM is being found in your path.
-vm 路徑不含引號,即使路徑含空格。eclipse.ini 後保存,需以管理員權限運行 Eclipse 才能生效(Program Files 寫入權限)。