Java/Eclipse on MacOSX: where is the src.zip?

After installing the most recent Java update you'll find src.jar under

/Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home

That's where I pointed "JRE home" for Java 1.6 in Eclipse to. Everything works as expected (until now :)


It appears in the latest OSX 10.6.7 (java 1.6.0_24) they have cleaned up all those directories... no src.jar exists anywhere and most of the indicated directories are missing.

annoying to no end...


As I understand it, as of "Java for Mac OS X 10.6 Update 3", there are 3 places you will find Java installed on MacOS.

  • /System/Library/Frameworks/JavaVM.framework/ was the old place.
  • /System/Library/Java/JavaVirtualMachines/ is the new standard place - there you will find the new release.
  • /Library/Java/JavaVirtualMachines is for '...developer previews, and 3rd party JVMs'

Note the MacOS rule of putting Apple-supplied standard components in /System/Library and local extensions into /Library

The JDK installed by default does not now have a src.jar (although it is a JDK, so has javac etc). But if you install the 'Java Developer package' from Apple, you will get

/Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk

which has src.jar under Contents/Home

So I think that the sane thing to do is install the developer package and point to it from your IDE.


Update - for "Java for Mac OS X 10.7 Update 1", having installed the developer package the source can be found at

/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/src.jar


This is my experience with src.jar !.

  • As mentioned earlier, you will have to sign up for the Apple developer account.(its free)

  • go to Downloads for Apple developers and then search for java.

  • I have chosen "Java for OS X 2013-005 Developer Package"
  • Once you download and install the package, you will find src.jar at /Library/Java/JavaVirtualMachines/1.6.0_65-b14-462.jdk/Contents/Home/

    Hope this helps!