Mac OS X上的JDK出现问题

时间:2018-08-05 06:55:25

标签: java macos java-8 webstorm

我有Mac OS X 10.13.6。以前我安装了可以正常运行的官方JDK 8,但最近我切换到了Homebrew版本,还升级到了JDK 10。这突然打破了我的Java设置。现在,当我尝试启动Webstorm时,出现以下错误:

com.intellij.ide.plugins.PluginManager$StartupAbortedException: java.lang.reflect.InvocationTargetException
    at com.intellij.ide.plugins.PluginManager.a(PluginManager.java:78)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.ide.plugins.PluginManager.a(PluginManager.java:75)
    ... 1 more
Caused by: java.lang.UnsatisfiedLinkError: /Applications/WebStorm.app/Contents/jdk/Contents/Home/jre/lib/libawt.dylib: dlopen(/Applications/WebStorm.app/Contents/jdk/Contents/Home/jre/lib/libawt.dylib, 1): Library not loaded: /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation
  Referenced from: /Applications/WebStorm.app/Contents/jdk/Contents/Home/jre/lib/libawt.dylib
  Reason: image not found
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1845)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at java.awt.Toolkit$3.run(Toolkit.java:1636)
    at java.awt.Toolkit$3.run(Toolkit.java:1634)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.loadLibraries(Toolkit.java:1633)
    at java.awt.Toolkit.<clinit>(Toolkit.java:1673)
    at com.intellij.ui.AppUIUtil.updateFrameClass(AppUIUtil.java:155)
    at com.intellij.idea.StartupUtil.prepareAndStart(StartupUtil.java:94)
    at com.intellij.idea.MainImpl.a(MainImpl.java)
    at com.intellij.idea.MainImpl.start(MainImpl.java:43)
    ... 6 more

文件夹/System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework/Versions/A/不存在,我在网上找不到有关如何安装的任何说明。我尝试再次从官方二进制文件安装Oracle JDK 8,但安装失败,没有详细信息。我设法从官方二进制文件安装了Oracle JDK 10,但该文件夹仍然不存在。我该如何解决?

谢谢。

1 个答案:

答案 0 :(得分:0)

因此,我遇到了this帖子,将我引向解决方案。我用PacifistJavaVM.framework安装dmg中提取了High Sierra