Results 1 to 3 of 3

Thread: Eclipse not showing documentation with OpenJDK

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu 8.04 Hardy Heron

    Eclipse not showing documentation with OpenJDK

    I have openjdk-6-doc and all the other requirements installed, but in Eclipse no documentation shows when hovering over anything. I even tried to change the prefences:

    Window --> Preferences --> Java --> Installed JREs

    Then I select java-6-openjdk and select Edit.

    I pick /usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar and click Javadoc Location.

    I put file:/usr/share/doc/openjdk-6-doc/api/ in the Javadoc location path, but this cannot be validated because the package-list file is missing. But in reality there is a file there (package-list.gz), which is an archive of the package-list file. So I extracted it but still no documentation. What am I doing wrong? Thanks.

  2. #2
    Join Date
    Jul 2009
    Location
    Texas
    Beans
    67
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Eclipse not showing documentation with OpenJDK

    I don't like to revive dead threads, but I am offering this as a help to others with the same issue I had (since this is first hit in google search).
    To the OP: even though you were merely posting a question, it worked like an answer to me.

    Situation: Trying to generate pretty JavaDoc on my machine.
    For a while, I have been complacent with my JavaDoc not linking to any Java builtins, but today I decided to change that. After some research, this thread was the only helpful thing that came up. I was starting to give up (because it seemed like the OP was stuck too), until I realized his mistake.

    I followed the same process, with two modifications:


    1. Slightly different directory location on system
    2. Changed location of documentation in two places, not one.


    In-depth Explanation:

    1. I opened up synaptic and browsed to the package openjdk-6-doc, which luckily was installed. I opened up the list of installed file for this package, and after some scrolling noticed three things:
      1. I had the same directory as the OP (/usr/share/doc/openjdk-6-doc/api/) present on my syste
      2. It was empty
      3. However, there was another populated api directory: /usr/share/doc/openjdk-6-jre-headless/api/
        So, in the relevant places, I used this directory instead (and made sure to put file:/). Eclipse was able to verify it both times.

    2. The OP described making the changes in the following location:
      Window --> Preferences --> Java --> Installed JREs
      As noted, this changes the preferences for when you hover over system classes and the documentation window pops up. I wanted to do more - to be able to generate links to system classes from within my JavaDoc. To make this additional change is really straightforward, but I am mentioning it in case it helps others. Go to:
      Project --> Generate JavaDoc...
      as you normally would when generated a JavaDoc, but instead of just clicking Finish immediately, go on to the next screen. There, you should see a list of jars that are all deselected, and will be followed by various URLs. Scroll down to rt.jar, click Browse..., and change the URL to say the same file location as in part (1).

  3. #3
    Join Date
    Sep 2005
    Beans
    4

    Re: Eclipse not showing documentation with OpenJDK

    Thanks, this was driving me nuts. Your method works perfectly.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •