Trying to use IntelliJ 12.0.2 on MAC, Where is my SDK?

Trying to use IntelliJ 12.0.2 on MAC, Where is my SDK?

If I do a javac -version I get the following output
javac 1.7.0_11

But I dont know where the SDK is install on a MAC!  Can someone please help me

5 comments
Comment actions Permalink

I'm not a mac person, but if you run the command (at the command line)

which javac

it should report where java is installed. Hopefully a Mac user will come along and give you more detail.

0
Comment actions Permalink

It was not that easy but I will update it over the weekend

0
Comment actions Permalink

Executing:

which javac

will always end with following result:

/usr/bin/java

which is only a link to:

/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java

where "Current" is also a link... so it's hard to find out where is JRE/JDK installed.
It's really complicated (no idea why) how JRE/JDK installation looks like on Macs.

0
Comment actions Permalink

Should be in the following location:

/Library/Java/JavaVirtualMachines/jdk1.7.0_11.jdk/Contents/Home

Should you need to use JDK 1.6... well, it depends:

  • update 37 or newer (don't think there's newer yet) is located (similar to 1.7) in:

/Library/Java/JavaVirtualMachines/1.6.0_37-b06-434.jdk/Contents/Home

  • update earlier than 37 is located in somwhere else, don't remember it right now :)

There's quite good article explaining all the magic about JDK install locations, paths and variables here: http://java.dzone.com/articles/juggling-multiple-versions

0

Please sign in to leave a comment.