Adding the Bukkit Javadoc to Eclipse

Discussion in 'Plugin Development' started by Mhalkyer, Feb 12, 2011.

Thread Status:
Not open for further replies.
  1. Offline



    I did my best to search the forums, wiki, and installation guide, but I can't figure out how to add the Bukkit Javadoc to Eclipse. I know if you right click the Bukkit jar in the package explorer (the bar on the left with files) and go to properties, there's a section called "Javadoc location". I've tried using the following URLs, but they won't work:

    Anyone have any tips? I'm still a bit new to this.
  2. Offline


    This would be pretty useful... I don't really have a MAJOR problem with browsing the Javadoc online, but I would love to have it built-in.
  3. Offline


    That would be very helpful...

    I just tried it using (, and the validator said something about needing the index.html (which is present ) and the 'package-list' files.
  4. Offline


    I'm not used to Java or Eclipse, so this is probably a hacky solution and might not even do what you're looking for, but here's what I did:
    1. Download both the CraftBukkit and the Bukkit source archives, and unzip them both.
    2. Make a new folder named "bukkit-docs" or something similar.
    3. Copy the entire contents of the src/main/java folders of each archive into the folder you just created, so it contains the net and org/craftbukkit from CraftBukkit and everything else in org from Bukkit.
    4. Zip this folder (so you have which contains bukkit-docs, for example).
    5. In Eclipse's project pane, under your project and "Referenced Libraries," right-click the Bukkit jar and pick Properties.
    6. Under "Java Source Attachment," click "External File..." and navigate to the zip you just created.
    7. Hit OK. The docs should now display during code-completion, and probably wherever else Eclipse shows them too.
    Hopefully this works for you. As far as I can tell Eclipse is just pulling the data from the source code comments rather than any actual existing javadocs.
    Kierrow likes this.
  5. @SpaceManiac

    That is what I currently does. The only difference is that I dont zip it
  6. Offline


    @SpaceManiac: The following will also work to get the Bukkit JavaDoc in Eclipse:
    1. Download the latest Bukkit source archive somewhere.
    2. In Eclipse' Package Explorer pane, under your project and "Referenced Libraries", right-click the Bukkit jar and click Properties.
    3. Under "Java Source Attachment," click "External File..." and navigate to your downloaded Bukkit source zip.
    4. Click OK.
    Apart from enabling JavaDoc, it also allows you to see the source for any Bukkit class (place the cursor on the class name in your code and press F3).

    Alternatively, you may click "External Folder..." in step 3, and select the folder in which you have extracted the Bukkit source code.
  7. Offline


    Thanks a lot guys, I'm definitely going to try this out.

    EDIT: @Virtlink That worked perfectly! Thanks!!!
  8. Offline


    I was trying everyone's solutions and none of them were exactly working for me. But here is a super easy one that I think is what you are supposed to do :)

    1. Right click your referenced bukkit source jar and select properties.
    2. Click on the "Javadoc Location" tab that is found on the left.
    3. Select "Javadoc URL" and put "" (without the quotes) as the location path)
    4. Click OK and away you go!
  9. Offline


    Anyone every thought of just cloning the Bukkit / CraftBukkit repos and using those instead of the jars? That's what i do. You need to set up maven(m2e for eclipse) but it works great!
  10. Offline


    Thank you! That was what I was looking for. You've made my day :)

    It's working exact like the SUN JavaDoc.
  11. Offline


    or just is default javadoc
  12. Offline


    Is this a joke? This thread is 3 years old!
    maxben34 and xTigerRebornx like this.
Thread Status:
Not open for further replies.

Share This Page