Change IntelliJ JVM version to a version you have installed to avoid this error.
1. Check your version of java:
alexandra$ java -version
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
2. Open IntelliJ configuration file:
vim /Applications/IntelliJ\ IDEA\ 13\ CE.app/Contents/Info.plist
3. Change JVMVersion to whatever version of Java you have installed
Change this -
<key>JVMVersion</key>
<string>1.6*</string>
to this -
<key>JVMVersion</key>
<string>1.8*</string>