how to add javaDoc to my Java code in a NetBeans based project?

后端 未结 6 831
长发绾君心
长发绾君心 2021-02-15 10:45

How can I add JavaDoc or other document to netbeans ?
I try with this way :

Tools >> Java Platform >> JavaDoc Tab >> JavaDoc.zip (in my de         


        
相关标签:
6条回答
  • 2021-02-15 11:22

    "Tools >> Java Platform >> JavaDoc Tab >> JavaDoc.zip"

    The problem with above step can be solved easily by moving down following two path already added in content panel as shown below.

    Step 1-

    • Goto: Tools >> Java Platform >> JavaDoc Tab and Add ZIP/Folder you want to add.

    Step 2-

    • enter image description here

    Step 3-

    • enter image description here

    That's all and if zip file doesn't works the extract first and then add it.

    0 讨论(0)
  • 2021-02-15 11:24

    If you are using maven in your project then follow below steps to attach Java docs for your attached libraries.

    1. Right click on "Dependencies" folder of your project.
    2. Then choose "Download javadoc" option
    3. It will download javadoc of your libraries and attached it.
    4. Now when you will press ctl + space then you will see docs for that library.

    and If you want to add javadoc for particular library then follow the options as suggested by Himanshu Soni.

    0 讨论(0)
  • 2021-02-15 11:30

    You followed the very right procedure, I've been threw this right before I write this answer, and as for this is the first result that shows up when you Google the problem, I think that many people will find it handy and save their time, the solutions is:

    UNZIP the JavaDoc.zip file that you are referring to ( which is supposed to be jdk-7u4-apidocs.zip for JavaSE 7 docs) and repeat the same procedure, which is Tools --> Java Platforms --> Javadoc ( tab ) then press " Add Zip/Folder, and point to the unzipped folder instead of the zipped one, restart NetBeans, and it will work smooth and direct.

    You should download the docs file from the following link: http://www.oracle.com/technetwork/java/javase/documentation/java-se-7-doc-download-435117.html

    After completing the described operation, you will have your javadocs available offline, and you don't need to be connected to the internet to know about APIs.

    Best regards brother.

    0 讨论(0)
  • 2021-02-15 11:38

    I had the same problem, and I solved it by removing all URLs and adding only the apidocs.zip downloaded from oracle. After that restart your NetBeans.

    Before test whether it works be sure the method you are looking for actually exists within the apidocs. Open index.html and make a search for that particular package.class.method you need.

    If it doesn't work, try to manually copy the apidoc.zip to the docs directory of netBeans: C:\Program Files\NetBeans 7.1.2\java\docs and then retry.

    0 讨论(0)
  • 2021-02-15 11:44

    try this in NetBeans IDE

    1. Choose Tools > Java Platform Manager from the main window.
    2. Select the platform to which you want to add Javadoc in the left panel of the dialog box.
    3. In the Javadoc tab, click Add ZIP/Folder and specify the location of the Javadoc files.
    4. Click Close.

    Hope this helps.

    0 讨论(0)
  • 2021-02-15 11:48

    You can't usually just add the javadoc zip as a separate library (at least this hasn't worked for me in the past.) In the libraries section you need to select the library you want to add the Javadoc for and then add the Javadoc jar for that specific library.

    Restart Netbeans then that should work. Though of course if there really is no Javadoc for that method you still won't get any (I've fallen into that trap a couple of times before!)

    0 讨论(0)
提交回复
热议问题