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

时间:2016-02-08 12:54:04

标签: java jvm osx-yosemite webstorm osx-elcapitan

El Capitan Yosemite 中进行了全新安装。 WebStorm 11.0.3。

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

所以我尝试在OSX的控制台实用程序打开后再次启动它,我发现了这些:

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

1 个答案:

答案 0 :(得分:2)

在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. 从Webstorm.app内容文件夹中打开Info.plist文件。
  2. <key>JVMVersion</key>下方的行从<string>1.6+,1.7+</string>更改为<string>1.6</string>
  3. 保存并关闭
  4. 现在它正在运作!

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

    enter image description here

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

相关问题