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:

updated.png

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

0
13 comments

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

0
Avatar
Permanently deleted user

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

0

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

0
Avatar
Permanently deleted user

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

0

Then please try File | Invalidate Caches and restart.

0
Avatar
Permanently deleted user

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

0
Avatar
Permanently deleted user

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.

-Shon

0
Avatar
Permanently deleted user

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

0
Avatar
Permanently deleted user

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.

0
Avatar
Permanently deleted user

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.

0
Avatar
Permanently deleted user

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.

0
Avatar
Permanently deleted user

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!/
0
Avatar
Permanently deleted user

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


0

Please sign in to leave a comment.