82

I've been using the JavaDocs for JDK 11

But I've noticed that the iFrames view appears no longer to be available. I've looked around, but can't see any details on why this has been done, and what the alternatives are if any? Can anyone provide more detail?

View for JDK 10

JavaDocs for JDK 10

View for JDK 11

JavaDocs for JDK 11

Gerold Broser
  • 14,080
  • 5
  • 48
  • 107
muttonUp
  • 6,351
  • 2
  • 42
  • 54

3 Answers3

69

In case anyone else has the same query, Frames are no longer generated by Default.

This is covered in JDK-8202961

In times past, to allow for navigation within API documentation, the standard doclet presented indexes in frames on the left side of the window to allow classes, packages and (more recently) modules to be selected for display in the main body of the window.

More recently, the doclet now supports a "search" feature, which provides a more versatile way of finding items to view. Separately, the doclet is moving towards using HTML 5 (only), and the basic support for frames in HTML 5 is less than it was in HTML 4.

and JDK-8187794 among others

Update the javadoc/doclet to generate no frames as a default. A warning should be generated if "--frames" option is specified to generate frames. The support for frames will be removed from a future release.

It seems that if you really wanted to use frames you could generate your own from the JDK src and experience the warning, but this will be removed completely at some point.

In summary, get used to the Search function, framed javadocs are on their way out!

muttonUp
  • 6,351
  • 2
  • 42
  • 54
  • 140
    I hate this so much. – lscoughlin Oct 10 '18 at 08:50
  • 60
    Well, it doesn't have to be frames, but some other form of navigation tree _like_ the previous frames would be nice. Referring to the search functionality isn't very helpful, since browsing over a navigation is totally different than searching for a specific term… It don't really like where Java is going at the moment. – radlan Nov 17 '18 at 11:18
  • 2
    You can still use the "All classes" button in the top left corner, which shows the old class list. – ST-DDT Dec 23 '18 at 17:45
  • 1
    @radlan They still provide the tree option. – NuAlphaMan Apr 09 '19 at 14:34
  • 27
    I agree, that this change is unwanted. I used the frames feature extensively and found it to be a very helpful way to navigate the API. If they wanted to remove the feauture they should have found another mechanism in HTML 4 or 5 to provide the same functionality. – atom88 Jun 28 '19 at 16:45
  • 41
    The problem with the "search" is that you can only search what you already know. Oracle misses that the point of navigating packages sometimes is to explore and discover the API. – Gustavo Jul 11 '19 at 21:16
  • 4
    > You can still use the "All classes" button... Even that seems to be gone in Java 12+. – stewori Jul 25 '19 at 23:33
  • 8
    It is like Oracle wants to kill java by intentionally making it harder to use. – Mike Miller Oct 18 '19 at 14:58
  • 1
    Frames are out, navigation is in: [JANITOR – Java API Navigation Is The Only Rescue](https://github.com/gerib/userscripts/wiki/JANITOR-%E2%80%93-Java-API-Navigation-Is-The-Only-Rescue): _Inserts a navigation tree for modules, packages and types (interfaces, classes, enums, exceptions, errors, annotations) into the Javadoc pages of Java 11+_. – Gerold Broser Dec 18 '19 at 17:58
  • @lscoughlin Do you like [this in my answer herein](https://stackoverflow.com/a/59423977/1744774)? – Gerold Broser Dec 28 '19 at 18:03
  • @radlan "_some other form of navigation tree like the previous frames would be nice_" – [Here you go!](https://stackoverflow.com/a/59423977/1744774) – Gerold Broser Dec 28 '19 at 18:05
  • 1
    @atom88 "_they should have found another mechanism_" – [I found(ed) one.](https://stackoverflow.com/a/59423977/1744774) – Gerold Broser Dec 28 '19 at 18:07
  • 1
    @Gustavo "navigating packages sometimes is to explore and discover the API" – [Here you go!](https://stackoverflow.com/a/59423977/1744774) – Gerold Broser Dec 28 '19 at 18:08
  • 16
    Absolutely agree, I've used the frames view _constantly_ to browse what particular packages offer. It's a fundamental browsing style. This has been happening in web apps all over the place -- replacing navigation with a search box, which means you must know ahead of time what you're looking for! – Sam Hokin Feb 09 '20 at 12:23
  • 3
    This kind of change makes me feel like that oracle wants to make unnecessary change, and make it different from Sun. – Eric Chen Jun 19 '20 at 08:23
  • 3
    I navigate the API docs by dragging the scrollbar for the classes iframe. I generally know what class I'm after, so it's easy to locate in the list with a mouse-only operation. Now I have to type the name in a box. Terrible. – Chris Jan 05 '21 at 14:37
  • 1
    this java API documentation is terrible which is too bad as I like java because it had such readable documentation. I don't think I can effectively navigate the java API's as it stand. How would I go about generating off-line documentation with the user friendly Frames view. – AgentBlueNote Jan 23 '21 at 22:48
  • 2
    So the API is undiscoverable now? The point of the frames view was to see what's available. Search is for what you know is there, for that I don't even leave the IDE. – juancn May 11 '21 at 18:52
  • @Chris [Not so terrible any longer](https://stackoverflow.com/a/59423977/1744774). – Gerold Broser Sep 20 '21 at 10:22
  • @AgentBlueNote [No need for an off-line documentation](https://stackoverflow.com/a/59423977/1744774). – Gerold Broser Sep 20 '21 at 10:23
  • @juancn By default it is. [There it is not](https://stackoverflow.com/a/59423977/1744774). – Gerold Broser Sep 20 '21 at 10:35
  • 1
    Bring back the frames option!! I don't understand why generating javadocs with frames couldn't remain an option, at least. Let users generate the javadocs the way they want! Removing the option kinda goes against being "open". – Jack Straw Jan 27 '22 at 00:48
  • 2
    This is absolutely killing the primary way in which I _learned_ the java class library. Completely pisses me off that it's no longer discoverable. – bvarner Jul 22 '22 at 15:31
20

I created JANITOR – Java API Navigation Is The Only Rescue which:

Inserts a navigation tree for modules, packages and types (interfaces, classes, enums, exceptions, errors, annotations) into the Javadoc pages of Java 11+.

JANITOR – Java API Navigation Is The Only Rescue

Gerold Broser
  • 14,080
  • 5
  • 48
  • 107
4

If you prefer the Java 10, and earlier, API documentation layout, with HTML iframes, then, you may want to check this out: https://github.com/climber09/Javadoc-Frames-Generator. It's a work in progress, so I welcome any feedback.

climber09
  • 41
  • 1
  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/30152941) – Dom Oct 23 '21 at 00:19
  • 1
    Unfortunately, it looks like the Phantomjs library was abandoned by its developer in 2018, so despite your project being interesting I can't advocate for its use in my organisation. – Ichiro Furusato Feb 22 '22 at 08:43
  • The Frames-Generator works like a charme. @Ichiro Furusato: Don't worry about the abandoned Phantomjs library. That only is needed once for generating, which can happen on any computer even outside your organisation. Once the new javadoc is generated. neither the Phantomjs nor the Frames-Generator are used any more, only the generated html files are needed. – Johanna Jun 21 '22 at 16:02