Apple's Java source and javadoc

Apple's Java installation does not include the source or javadoc api. Apple does have a developer download at X which does contain these files at <http://developer.apple.com/java/download/>. On my machine the package in "javadeveloper_10.6_10m3261.dmg" is installed at
/Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/
If you are using NetBeans you will need to add this as a new "Java Platform". This posting assumes you called the platform "JDK_1.6". Once you have created the platform you will need to manually fix how javadoc is used. To do this, in the file
~/.netbeans/6.9/config/Services/Platforms/org-netbeans-api-java-Platform/JDK_1.6.xml
edit the //javadoc/resource element so that "!/docs/api/" is appended. For example,
<javadoc>
<resource>jar:file:/Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/docs.jar!/docs/api/</resource>
</javadoc>
For some reason, Netbeans emends the source resource with "!/src/" but not the javadoc resource.

No comments: