Wednesday, October 27, 2010

How to fix missing source for latest Java for Mac OS X 6 22

This will make clicking through to the JDK source work in Eclipse again after updating to the latest Java for Mac OS X.
  1. Go to and download Java for Mac OS X 10.6 Update 3 Developer Package
  2. Install it.
  3. Open a window
  4. sudo -s
  5. cd /System/Library/Frameworks/JavaVM.framework/Home
  6. ln -s /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/src.jar .
  7. ln -s /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/docs.jar .


J. Anthony said...

Wait... you haven't switched to Python + git yet?

Unknown said...

stop stalking my blog and get back to work. =)

J. Anthony said...

google reader... easy, passive stalking. :P

Mike said...

Couldn't you just point your IDE at the JDK bundle in /Library/Java/JavaVirtualMachines? Symlinking the src and docs from the system installed one will only cause it to be out of date when they system upgrades again.

Unknown said...

There are many ways to skin a cat. This is the one I prefer.

martinrleon said...

It's rare that I have anything bad to say about Apple, there are thigs that are annoying but much less so than the alternatives. This one is just plain DUMB! I can't believe this kind of hack has to be done. Thanks for figuring it out! I installed the Java package but couldn't figure out whether it even did anything. I hate Apple for this (at least for a couple of hours). Thanks for posting your solution!

martinrleon said...
This comment has been removed by the author.