The Java Standard Edition API since version 11 has been published without the traditional HTML frames layout that many developers have become accustomed to. If you want to view the Java edition 11 (or later) API with HTML frames, as you could with earlier Java editions, then you may want to give this a try.
The Javadoc Frames Generator is a command line tool written in pure Javascript. It uses Phantomjs to parse the javadoc files in a local directory and produce the files needed for an HTML frames layout. The generated layout is similar to that of the Java SE 10 API.
First you must have Phantomjs installed. Then you can copy the script and template files to a directory of your choice, and from that directory, execute the following command:
$ phantomjs jf-generator.js <path-to-javadoc-home>
Alternatively, the path-to-javadoc-home parameter can be supplied by
editing the configuration file jf-config.js. For example:
exports.javadocPath = '/path/to/jdk11/docs/api';
...
After the script executes, open the newly created file: <path-to-javadoc-home>/main.html
The generated frames layout is similar to the Java SE 10 API, with a few notable differences:
View packages in the package list frame (upper left), grouped by module, in the All Modules list, which has expandable tabs.
Or select the All Packages list, as was available in previous editions.
Note that a button is placed along the top edge of main.html, near
the API version header (top right), to toggle the view mode between frames and
no-frames.
The Javadoc Frames Generator only creates new files under the specified directory. None of the original API files are modified.
Phantomjs is the only dependency. You can download it from the Phantomjs website, or from Github, https://github.com/ariya/phantomjs.
If you're using Linux, you may see an error running phantomjs that looks something like this:
Auto configuration failed
140625982273408:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libproviders.so): libproviders.so: cannot open shared object file: No such file or directory
140625982273408:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
140625982273408:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=providers, path=providers
140625982273408:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=providers
Phantomjs depends on OpenSSL. The problem arises from changes to OpenSSL configuration
in operating systems like Linux, and since the active development of phantomjs
was suspended back in 2018, these changes may not be supported. But since SSL is not
needed to run the Javadoc Frames Generator code, there is a simple solution. On
Linux or macOS, you just need to set the OPENSSL_CONF environment variable when
running phantomjs. The simplest solution looks like this:
$ OPENSSL_CONF=/dev/null phantomjs jf-generator.js <path-to-javadoc-home>
An alias also works well for this purpose. For example:
$ alias phantomjs='OPENSSL_CONF=/dev/null phantomjs'
And then just use the phantomjs command as usual.
Copyright © 2021 - 2026 James P Hunter



