11.1.1 - Mac OSX - JDK set, but IntelliJ IDEA doesn't see it

I have IntelliJ IDEA 11.1.1 installed (IU-117-117).
I setup the Java 1.6 JDK on Mac OSX but the IDE doesn't seem to see it.

I restarted the application and this is what I see:


Any suggestions as to how to resolve this?
The path is correct as that is what Maven is using as well.


Please make sure that the SDK is selected as a project SDK under Settings | Project.


That was one of the first things I checked.
I thought I may have had it set wrong.  I have a tendency to miss the obvious but find the tiny problems.


This is what is selected:
Screen shot 2012-04-02 at 9.17.10 AM.png


Then please make sure that each of the modules either inherits the project JDK or has the correct JDK selected.


Yep - Everyone has the "Project SDK" selected.  :O
I tried switching it specifically to the 1.6 SDK but that didn't work, either.

Screen shot 2012-04-02 at 9.27.55 AM.png


Then please try File | Invalidate Caches and restart.


Problem persists, unfortunately.
I tried completely removing all the settings on the machine and reinstalling IDEA, my license, etc. and no luck.


I'm was the same issue, more or less. I ended up deleting the JDK definition in IDEA and recreate it, which caused it to include many more jar files than before. Seems to be working now.



Still no luck.
@Shon:  what is your JDK path?


Same as your's from your original screenshot, but after I recreated it the jar files that it included in the classpath were very different than before which also matched your screenshot. This is the updated classpath:

  • jar:///System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/deploy.jar!/
  • jar:///System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/dt.jar!/
  • jar:///System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/javaws.jar!/
  • jar:///System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/jce.jar!/
  • jar:///System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/jconsole.jar!/
  • jar:///System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/management-agent.jar!/
  • jar:///System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/plugin.jar!/
  • jar:///System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/sa-jdi.jar!/
  • jar:///System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/charsets.jar!/
  • jar:///System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar!/
  • jar:///System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsse.jar!/
  • jar:///System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/ui.jar!/
  • jar:///System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/apple_provider.jar!/
  • jar:///System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/dnsns.jar!/
  • jar:///System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/localedata.jar!/
  • jar:///System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunjce_provider.jar!/
  • jar:///System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunpkcs11.jar!/

I'm pretty sure the ones in the Classes directory are the ones that make the difference.

I also had to fix the project to point to the recreated JDK def, as well as remove an import that the editor had apparently inserted into one of my source files to try to resolve String before it would actually work.


That was it!  :)
It seems like it just didn't pick up the "Classes" data appropriately.

After manually adding that information it seemed to work just fine.
I guess there's something odd about the Mac OSX Java file structure for 1.6 that makes it not pick it up properly by default.


I had this same issue and had to get support from JetBrains to fix the problem. As you said, I had to manually add classes.jar and each of those other missing jars since IntelliJ wouldn't do this automatically.


Wonder if this issue been solved? I still need add this jar manually.

And also it will cause conflicting when I use JRebel Debug.
Since there are some exception in this jar were caught by JRebel:

  • jar:///System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar!/

I don't get the conflict in JRebel, but for Java 1.6 the problem still exists on Mac.


Please sign in to leave a comment.