RubyMine 7.1.4在Mac OS 10.12启动崩溃问题求助
Hey there, let's break down why this crash is happening and how to fix it quickly.
The Root Cause
Your issue boils down to compatibility: RubyMine 7.1.4 is an older IDE version built to work with Java 8 and earlier. Java 9 removed several classes from the sun.misc package—including the sun/misc/resource class your error mentions. That’s why setting JAVA_HOME alone didn’t resolve the problem; the IDE can’t find the required class in Java 9.
Step-by-Step Solutions
1. Downgrade to Java 8 (Recommended)
The most reliable fix is pairing RubyMine 7.1.4 with Java 8. Here’s how to switch on Mac:
- First, check if you have Java 8 installed by running this in Terminal:
If it returns a file path, you’re set. If not, download Java 8 from Oracle’s official archive./usr/libexec/java_home -v 1.8 - Temporary switch: Run these commands in Terminal to set Java 8 as your current JDK and launch RubyMine:
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) open /Applications/RubyMine.app - Permanent switch: Edit your shell profile file (either
~/.bash_profileor~/.zshrc, depending on your default shell) and add:
Save the file, then runexport JAVA_HOME=$(/usr/libexec/java_home -v 1.8)source ~/.bash_profile(orsource ~/.zshrc) to apply the changes immediately.
2. Force RubyMine to Use Java 8 via Launch Config
If you need to keep Java 9 for other apps, you can tell RubyMine specifically to use Java 8:
- Navigate to RubyMine’s installation directory:
/Applications/RubyMine.app/Contents/bin - Open the
rubymine.vmoptionsfile (oridea.vmoptions—they’re interchangeable in older versions) with a text editor. - Add this line at the bottom, replacing the path with your actual Java 8 home path (from the
java_homecommand earlier):-jdkhome /Library/Java/JavaVirtualMachines/jdk1.8.0_xxx.jdk/Contents/Home - Save the file and restart RubyMine.
Verify the Fix
After making changes, run java -version in Terminal to confirm you’re using Java 8, then launch RubyMine. The crash should no longer occur.
内容的提问来源于stack exchange,提问作者Mansi Shah

