IntelliJ not starting after OS X Yosemite update

半城伤御伤魂 提交于 2019-12-04 07:35:05

问题


I upgraded my OS X to Yosemite and now my IntelliJ IDE is not starting.

Here is the error message:

To open “IntelliJ IDEA” you need to install the legacy Java SE 6 runtime.


回答1:


The officially recommended solution is to install/update JDK 1.6 on Mac (if this link doesn't open in Safari, try Firefox).

Modifying Info.plist will break the application digital signature and prevent the patch updates.

We do not recommend modifying Info.plist file to run under JDK 1.7 or 1.8.

Please check this document for the list of known critical issues specific to Java 7 and 8 on Mac that prevent JetBrains from using these Java versions by default.

While Java 6 has known security issues and is EOL, these issues are most likely not exploitable when you are using Java 6 to run IntelliJ IDEA (and other IDEs based on this platform). Java 6 doesn't install browser plugin to run applets and it would be extremely hard (if not impossible) for the remote attacker to exploit it when it's used to run the IDE.

If you can't accept these (probably minimal) risks of running under Java 6, we recommend using the special IDE distribution with bundled Java 8 (still experimental). To obtain this version add -jdk-bundled to the file name. Since IDEA 14.1 the suffix has changed to -custom-jdk-bundled

Example:

  • http://download.jetbrains.com/idea/ideaIU-14.0.1.dmg (version that requires Java 6)
  • http://download.jetbrains.com/idea/ideaIU-14.0.1-jdk-bundled.dmg (version with bundled Java 8)

Please note, it's just an example and may link to an outdated version, please use the latest available version from the the downloads page, click Download, cancel the download, copy the direct link from the Thank you for downloading IntelliJ IDEA page and add -jdk-bundled (-custom-jdk-bundled since 14.1) to the file name. Use this version only if running under Java 6 is absolutely not an option for you, be aware of the known issues.




回答2:


What you need to do is go ahead and edit this file:

/Applications/IntelliJ IDEA 13.app/Contents/Info.plist

Replacing this:

<key>JVMVersion</key>
<string>1.6*</string>

with this:

<key>JVMVersion</key>
<string>1.7*</string>

Edit: As said by intellij member @crazycoder, the recomended way to total fix this is to install the latest jdk 1.6




回答3:


I found that installing Java for OS X 2014-001 after upgrading to Yosemite has solved it for me.




回答4:


Or change asterisk to plus

<key>JVMVersion</key>
<string>1.6+</string>

The drawback is OS X will with each IDEA start ask you for network permission.

But Java 8 still have some bugs, especially on Retina devices and JetBrains still encourages to use Java 6 from Apple. Latest update working with IDEA on Yosemite is available here http://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US




回答5:


If you have latest JDK, you could change info.plist to handle this.

edit Info.plist file, in your jdk, for example:

/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Info.plist

update JVMCapabilities dictionary to have following values:

          <key>JVMCapabilities</key>
            <array>
                    <string>CommandLine</string>
                    <string>JNI</string>
                    <string>BundledApp</string>
                    <string>WebStart</string>
                    <string>Applets</string>
            </array>

Now, try restarting the app. The application should now make use of the your JDK instead of looking for JDK 6




回答6:


OSX has its JDKs in the folder /Library/Java/JavaVirtualMachines/. There can be multiple versions there, for e.g. 1.7 or 1.8.

As indicated by @CrazyCoder, IntelliJ needs a 1.6 version to be present there, which Yosemite kicked out (in favor of a 1.7 if I'm not mistaken).

To install jdk 1.6, you can indeed simply use the dmg from apple as recommended by @CrazyCoder and confirmed by @LanceP.

As a homebrew cask user, I installed via

brew tap caskroom/versions
brew cask install java6

After this, IntelliJ was up and running again.

See also this useful post on managing multiple Java versions on OSX.



来源:https://stackoverflow.com/questions/26433495/intellij-not-starting-after-os-x-yosemite-update

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!