Wednesday, March 9, 2011

Fix missing source for Java Mac OS X 10.6 Update 4

Once again, Apple does something stupid to us poor idiot Java developers. 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 http://connect.apple.com and download Java for Mac OS X 10.6 Update 4 Developer Package
  2. Install it.
  3. Open a Terminal.app window
  4. cd /System/Library/Frameworks/JavaVM.framework/Home
  5. sudo ln -s /Library/Java/JavaVirtualMachines/1.6.0_24-b07-334.jdk/Contents/Home/src.jar .
  6. sudo ln -s /Library/Java/JavaVirtualMachines/1.6.0_24-b07-334.jdk/Contents/Home/docs.jar .

6 comments:

Cliff said...

Awesome info! I was waiting to apply this update today until the fix was out... because I knew it would be broken. Thanks for the post.

Chetan said...

You should note that the version available via ADC is the *developer* package that contains source, versus the package normally installed via Software Update which does not.

Bert Picot said...

Thanks for this. I just wasted a ton of time trying to figure this out. Much appreciated and I agree with your attitude about Apple.

Spanky Quigman said...

Great tip, thanks for posting.

Spanky Quigman said...

Very disappointed in you for changing the name of your blog. It's a sad day.

Jon Scott Stevens said...

Funny. Sorry to disappoint you Spanky!