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

后端 未结 5 1442
夕颜
夕颜 2021-02-15 10:52

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         


        
相关标签:
5条回答
  • 2021-02-15 11:29

    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:32

    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:35

    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)
  • 2021-02-15 11:42

    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:46

    "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)
提交回复
热议问题