Eclipse 啟動發生 libjvm.dylib does not contain the JNI_CreateJavaVM symbol

Eclipse/SpringToolSuites4 啟動發生 libjvm.dylib does not contain the JNI_CreateJavaVM symbol

更新 openjdk 後,無法開啟 Eclipse/SpringToolSuites4,錯誤訊息如下 :

The JVM shared library "/Users/foo/Library/Java/JavaVirtualMachines/adopt-openjdk-11.0.12/Contents/Home/bin/../lib/server/libjvm.dylib" does not contain the JNI_CreateJavaVM symbol.

看起來應該是更新的 openjdk(adopt-openjdk-11.0.12)有問題,編輯 Eclipse/SpringToolSuites4 的 Info.plist,指定要執行的 Java 路徑(原先正常的 adopt-openjdk-11.0.11)即可。

<!-- Info.plist 搜尋 -vm 字串 --> 

<string>-vm</string><string>/Users/foo/Library/Java/JavaVirtualMachines/adopt-openjdk-11.0.11/Contents/Home/bin/java</string>

0 則回應: