Reputation: 111
Problem: running IntelliJ 12 on OSX 10.8.2 with Java 7.
I have a fresh OSX 10.8.2 Mt Lion install, and I've installed the official Oracle Java 7 (no Java 6 present).
I've installed the latest version (12.0.1) of IntelliJ IDEA, and edited /Applications/IntelliJ IDEA 12 CE.app/Contents/Info.plist to have JVMVersion like so:
JVMVersion
1.7*
When I try to start up IDEA (or when I run ./Applications/IntelliJ\ IDEA\ 12\ CE.app/Contents/MacOS/idea) I get "No Java runtime present, requesting install." and a popup window saying "To open “IntelliJ IDEA,” you need a Java SE 6 runtime. Would you like to install one now?". I chose "Not Now".
I do have Java 7, but it seems that for some reason IDEA can't see it.
>java -version
java version "1.7.0_12-ea"
Java(TM) SE Runtime Environment (build 1.7.0_12-ea-b07)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b28, mixed mode)
My .profile file has
export JAVA_HOME=$(/usr/libexec/java_home)
export PATH=$JAVA_HOME/bin:$PATH
Some terminal output:
>echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.7.0_12.jdk/Contents/Home
>echo $PATH
/Library/Java/JavaVirtualMachines/jdk1.7.0_12.jdk/Contents/Home/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/MacGPG2/bin
In my System Preferences > Java, there is a single entry; Java 7 (1.7.0_12-ea).
So, what little silly thing am I missing? :)
Upvotes: 11
Views: 8568
Reputation: 10308
I had a very similar problem to what you explained here in your question.
The solution that fixed my problem was as follows:
In:
Project Settings > Compiler > Java Compiler
I changed the drop down Use compiler
from Javac
to Eclipse
!
Non of the other solutions I found on the web was helpful. Hope this helps you my unknown fellow reader.
IMPORTANT: THIS HAD NOTHING TO DO WITH MY JAVA_HOME AS IT WAS SET CORRECTLY.
Upvotes: 0
Reputation: 1
Seems you need to add some fields to this file: /Library/Java/JavaVirtualMachines/jdk1.7.**.jdk/Contents/
<key>JVMCapabilities</key>
<array>
<string>CommandLine</string>
<string>JNI</string>
<string>BundledApp</string>
<string>WebStart</string>
<string>Applets</string>
</array>
Upvotes: 0
Reputation: 1593
One possible workaround as I posted on the other question: https://stackoverflow.com/a/19621573/165835, for those are OCDs that can't have two JDK on their machines..
Upvotes: 0