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
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.