gpt4 book ai didi

java - WebStorm 11 全新安装无法在 Mac OSX 中启动

转载 作者:行者123 更新时间:2023-11-30 03:03:56 31 4
gpt4 key购买 nike

我在 El CapitanYosemite 的新安装中都发生过这种情况。 WebStorm 11.0.3。

当尝试从任何来源(Finder、Spotlight 等)启动 WebStorm 时,它似乎什么也没做。没有明显的错误,什么都没有。

所以我尝试在打开 OSX 的 Console 实用程序的情况下再次启动它,我发现了这些:

08/02/16 12:57:29,912 webstorm[99959]: Cannot load JVM bundle: Error Domain=NSCocoaErrorDomain Code=3587 "The bundle “OpenJDK 8” couldn’t be loaded because it is damaged or missing necessary resources." (dlopen_preflight(/Applications/WebStorm.app/Contents/jre/jdk/Contents/MacOS/libjli.dylib): no suitable image found.  Did find:
/Applications/WebStorm.app/Contents/jre/jdk/Contents/MacOS/libjli.dylib: file too short) UserInfo=0x610000069a40 {NSLocalizedFailureReason=The bundle is damaged or missing necessary resources., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Applications/WebStorm.app/Contents/jre/jdk/Contents/MacOS/libjli.dylib, NSDebugDescription=dlopen_preflight(/Applications/WebStorm.app/Contents/jre/jdk/Contents/MacOS/libjli.dylib): no suitable image found. Did find:
/Applications/WebStorm.app/Contents/jre/jdk/Contents/MacOS/libjli.dylib: file too short, NSBundlePath=/Applications/WebStorm.app/Contents/jre/jdk, NSLocalizedDescription=The bundle “OpenJDK 8” couldn’t be loaded because it is damaged or missing necessary resources.}

当应用下面解决方案中所述的第一步时,我看到了这些:

08/02/16 13:01:01,146 webstorm[99970]: Value of WEBSTORM_JDK: (null)
08/02/16 13:01:01,149 webstorm[99970]: fullFileName is: /Applications/WebStorm.app/Contents/bin/webstorm.vmoptions
08/02/16 13:01:01,149 webstorm[99970]: fullFileName exists: /Applications/WebStorm.app/Contents/bin/webstorm.vmoptions
08/02/16 13:01:01,149 webstorm[99970]: Value of WEBSTORM_VM_OPTIONS is (null)
08/02/16 13:01:01,149 webstorm[99970]: Processing VMOptions file at /Applications/WebStorm.app/Contents/bin/webstorm.vmoptions
08/02/16 13:01:01,149 webstorm[99970]: Done
08/02/16 13:01:01,150 webstorm[99970]: JNI_CreateJavaVM (/Applications/WebStorm.app/Contents/jre/jdk) failed: 4294967295

最佳答案

在 GitHub、Jetbrain 论坛等搜索后,我看到其他人也遇到了 JVM 问题,但并没有完全解决我的问题。

对于libjli.dylib问题,我在 Webstorm.app 的内容中搜索了该文件,发现它存在于两个位置,但其中一个文件(表示文件太短的那个)看起来只是重定向到另一个文件。所以我只是复制了更大的libjli.dylib并替换了被投诉的那个。

据我所知,现在没有重定向,并且控制台已清除该错误。但 Webstorm 仍然没有启动,现在显示第二个错误,JNI_CreateJavaVM failed .

事实证明,Webstorm 和新版本的 Java 中有些东西不太对劲。我碰巧使用的是 Java 1.8。

我看到推荐的并且对我有用的是使用 Brew 安装 Java 1.6 并告诉 Webstorm.app 使用该版本。请记住,这样做,您的系统将继续使用更新的 Java 版本

首先在终端中安装 Java 1.6:

~ brew tap caskroom/versions
[...]
~ brew cask install java6
[...]
🍺 java6 staged at '/opt/homebrew-cask/Caskroom/java6/1.6.0_65' (64M)

现在告诉 Webstorm 使用 1.6:

  1. 打开Info.plist Webstorm.app 内容文件夹中的文件。
  2. 更改下面的行 <key>JVMVersion</key>来自<string>1.6+,1.7+</string><string>1.6</string>
  3. 保存并关闭

现在它可以工作了!

如果 Webstorm.app 尝试使用您没有(或找不到)的 Java 版本,您将看到如下内容:

enter image description here

同样,对我来说,这个问题是使用 Brew 修复的。

关于java - WebStorm 11 全新安装无法在 Mac OSX 中启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35270187/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com