I am running NetBeans 7.3 (with updates) on Mac OS/X. I also verified this problem on 7.3.1.
I want to use my local copy of JavaDocs. My copy is unzipped because I like to use it in a browser too. It is unzipped under my home directory ~/JavaDocs
(For those unfamiliar with Unix, "~" means my home directory.)
So, I have api, images, index.html, jdk, jre, legal, platform, and technotes all under ~/JavaDocs.
Within NetBeans I go to Tools / Java Platforms. There is only one JDK, JDK 1.6.
I go to JavaDoc tab, Add ZIP/Folder and browse to ~/JavaDocs, select it, and click "Add Zip/Folder". Instead of seeing ~/JavaDocs in the NetBeans window, I see
I have no idea where it is getting that. Naturally, JavaDocs doesn't work in NetBeans. I can't figure out how to fix this (short of manually editing NetBeans XML files). Every time I try deleting that path and putting in the correct path it acts as if I selected that crazy path.
Just FYI, ~/JavaDocs works perfectly from my browser and is unaltered from my unzip.
The JavaDocs is not a valid Javadoc root folder, so the NB tries to find out the nearest JavaDoc folder under the selected folder. In your case it's the ~/JavaDocs/jre/api/security/smartcard/spec which is not the javadoc for JDK. The correct javadoc folder is ~/JavaDocs/api if you unzipped the default apple JDK javadoc containing:
In the Java Platform Manager add the following javadoc root: ~/JavaDocs/api and everything will work fine.
Cool. That works. However, I still consider this a bug for the following reason.
How would I (or anyone else) have known what you said without your help or reading the source code?
If the directory selected is not a valid root directory the system should say so rather than choose some random sub-directory. The error message should also indicate how to tell if it is a valid root directory, and it should suggest likely paths (like your response did).
I am changing the state back to REOPENED not to be obstinate or disrespectful but merely to request a second look at the problem. I won't do it again.
In fact the problem is only with Apple's Javadoc bundle. The Oracle (Sun) Javadoc has single javadoc root and NB behaviour is exactly what user wants (he selects doc folder or jar and the IDE itself finds the correct root). The error message will make the usability worse as the user will be forced to select the correct root (api folder). As the Apple's JDK is deprecated and is replaced by Oracle JDK 7 (Apple will not provide JDK 7) it's probably low priority.
A possible solution is to find all the javadoc roots under the selected folder (up to some depth). I will try to do it and if it does not affect the speed significantly I will integrate it.
Thanks. The JavaDocs I am using were from Oracle Java 6 download and not part of the Mac.
Right, it seems that even the Oracle Javadoc now contains more roots.
Will take some time as an API extension was needed and API change process is required. For details see issue #232142.
Fixed jet-main 578bceffa02f
Integrated into 'main-silver', will be available in build *201307052300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Tomas Zezula <email@example.com>
Log: #232084:Can't utilize locally stored JavaDocs