This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The javadoc directory chosen by the j2seplatform implementation is either wrong or unusable. Given a JDK installed at "jdk1.5", the j2seplatform impl selects "jdk1.5/docs" as the javadoc directory, if this directory exists. (See method below.) Given the structure of the JDK doc tree(*), the correct directory should be "jdk1.5/docs/api". (*) See http://java.sun.com/j2se/1.5.0/download.jsp To reproduce: 1. Change dir to javahome and unzip the doc tree, creating "docs" directory. 2. Install netbeans. 3. Right click on a java platform classname; netbeans fails: "Javadoc not found. Use Library Manager to specify Javadoc for classpath items and the Java Platform Manager to..." (The error message is so long that only half is displayed..) To workaround: Open Java Platform Manager, remove the existing Javadoc entry "javahome/docs" and add a functional entry: "javahome/docs/api". Note: I tried to use the doc.zip file directly by adding it as a Zip file, but that didn't work either. Possible enhancements: 1. Make Javadoc entries editable. Browse should take you to the specified directory and let you modify the existing entry. 2. Allow JDK doc.zip to be assigned as a javadoc Zip file. 3. Support javadoc URLs. (Could even default to Sun's javadoc online.) org.netbeans.modules.java.j2seplatform.platformdefinition.DefaultPlatformImpl static List getJavadoc (File javaHome) { if (javaHome != null ) { File f = new File (javaHome,"docs"); //NOI18N if (f.isDirectory() && f.canRead()) { try { return Collections.singletonList(f.toURI().toURL()); } catch (MalformedURLException mue) { ErrorManager.getDefault().notify (mue); } } } return null; }
The docs folder is OK, since it is a documentation folder of the JDK, the api folder is found under the docs folder. Works fine on Linux need to verify on Windows, but seems as WORKSFORME.
Works either on Windows. I've tried it using both the Javadoc index search and code completion. Comments to the enhancement below: 1) The entries are not editable, but you can remove an old one and add the new one. 2) You can assign JDK docs as zip file. 3)There is already an enhancement for it, the problem is that the javadoc module is based on FileObject not URLs and the current implementation of HTTPFileSystem is not very reliable.
I am reporting that Show Javadoc fails (Alt-F1), while you are testing that Javadoc Index Search (Shift-F1) works.
To reproduce: Assume NetBeans installs the javadoc link for my platform as "c:\jdk1.5\docs" I go into my source code and right click on a reference to a java.* class (an Object or a String, for example). Then I select Show Javadoc. If I leave the javadoc link as "c:\jdk1.5\docs" it fails. If I change the javadoc link to "c:\jdk1.5\docs\api" it works. NOTE: If I use Javadoc Index Search (Shift-F1) instead, then the installed docs link DOES work -- so my report that the directory is wrong is wrong. Must be a problem in the way Show Javadoc is implemented.. Fails in same way with either system browser or Swing browser.
OK, you are reporting the issue to wrong component. I tried it on the Javadoc Index Search since I know the code behind it. If it works any other feature should work also if it is not broken, it uses the smae JDFBQImpl.
We have tried to reproduce on WinXP for java.lang.String, java.lang.System and java.math.BigDecimal but it works fine. Honestly I don't know what could become wrong in your environment. Could you please double-check that the docs dir is fine (the particular class html files exist etc.) and possibly use a fresh userdir? Thanks. Closing as worksforme for now please reopen if necessary.
Perhaps the problem is due to a bad interaction with the Mobility Module? Though, AFAIK, Show Javadoc has never worked for me without modifying the Javadoc directory. I'll keep trying (and continue to workaround, I expect), and will report back if I discover any new clues.
It may be possible, that j2me integration brakes this feature. All of us tried it in the pure NetBeans. I will install the j2me pack to verify. Thanks for the feedback.
It is caused by j2me module, it's reproduceable even on the Linux while having the j2me support installed. If you uninstall it javadoc works fine. Under the debuger I've found that the org.netbeans.modules.kjava.j2meplatform.JavadocForBinaryQueryPlatformImpl causes the problems. Possible solutions: Fix the JavadocForBinaryQueryPlatformImpl not to respond to j2se platforms requests. Correct the priority of the j2me JDFBQI to be called after j2se JDFBQI. The j2se JDFBQI priority is 150. If the j2me JDFBQI will have 151 it should work fine.
Yes, we have an older implementation of the JavadocForBinaryQuery that handle Javadoc for all Java platforms (the same behavior as does J2SE implementation). Our implementation does not search for correct Javadoc root within the jar/zip files but expects the root is equal to jar/zip root. But our implementation is registered with higher priority. We have two simple options to fix it: by completely removing our implementation (because J2se one works even for us) or simply change the priority to >150.
decreasing priority and changing TM to 5.1 this issue won't be fixed for 5.0 release. Easy workaround exists - add full path to documentation or correct existing link e.g. - the javadoc link as "c:\jdk1.5\docs" fails. Change the javadoc link to "c:\jdk1.5\docs\api" then it works.
*** Issue 71482 has been marked as a duplicate of this issue. ***
*** Issue 71394 has been marked as a duplicate of this issue. ***
*** Issue 72028 has been marked as a duplicate of this issue. ***
fixed in trunk by removing src/org/netbeans/modules/kjava/j2meplatform/JavadocForBinaryQueryPlatformImpl.java
it still shows "Javadoc not found. Use Library Manager to specify... " tested with MP build 0313_2.
seems to be working with nb60-0327+mp0328 (maybe I didn't add javadoc for the j2se when i verified it last time?)
fixed in 5.5
*** Issue 80966 has been marked as a duplicate of this issue. ***
v
close old issues