Deciphering Symlink hell on a Mac (Java and Ant)

When I first cut over to the Mac a few months back, I remember going crazy trying to decipher what the Mac guys had done when they installed Java. It took me a while to figure out where the API docs were.

Java Symlink Hell

Here’s the scoop:
/System/Library/Frameworks/JavaVM.framework/Versions
A is the folder (pointed to by Current)
1.6.0 is a folder (pointed to by Current JDK)
Current is a Symlink -> /System/Library/Frameworks/JavaVM.framework/Versions/A
CurrentJDK is a Symlink ->
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0

1.3 is Symlink to-> 1.3.1
1.4, 1.4.2, 1.5, 1.5.0, 1.6 are all Symlinks to 1./6.0
/Library/JavaHome points to 1.6.0/Home

/usr/libexec/java_home is Symlink to
/System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/java_home (This isn’t the JDK version – I guess it’s the Runtime)

Home folder contains docs.jar that you can extract to get API docs; Yippie!

Ant Symlink Hell

usr/bin/ant -> usr/share/java/ant-1.7.1/bin/ant

usr/share/ant  -> /usr/share/java/ant-1.7.1

Advertisements

About this entry