-
Notifications
You must be signed in to change notification settings - Fork 0
Browsing
From a ja workspace, open API documentation for the modules selected by the current directory:
ja doc --browseOpen a qualified type directly:
ja doc --browse java.lang.String
ja doc --browse com.example.application.Mainja resolves the workspace's modular compilation context and supplies it to jdocserver.
Use the standalone command to browse the running JDK:
jdocserver --browseOpen a JDK type directly with the standalone command:
jdocserver --browse=java.lang.StringBrowsing the JDK requires its source archive at lib/src.zip.
Without --browse, the server prints its URL and remains in the foreground until interrupted:
$ jdocserver
...
Generating standard Javadoc overview in the background...
Type documentation is generated on demand.
Serving Java API documentation on 127.0.0.1 port 8000
URL http://127.0.0.1:8000/Supply the same modular Java options used to compile the project:
jdocserver \
--module-path build/modules:lib/example.jar \
--module-source-path src \
--module com.example.application \
--source-path lib/example-sources.jarArgument files are also accepted. For example, main.args can contain one argument on each non-empty line:
--module-path
build/modules:lib/example.jar
--module-source-path
src
--module
com.example.application
--source-path
lib/example-sources.jar
Start the server with that context and open its overview:
jdocserver --browse @main.argsModule-path, module-source-path, source-path, and system entries retain their standard JDK ordering and lookup semantics. Other supported inputs include --add-modules, --limit-modules, --add-reads, --add-exports, --patch-module, --release, --source, and --enable-preview.
Select another JDK with --system:
jdocserver --system /path/to/jdk @main.argsThe selected JDK must provide lib/src.zip so its module and package documentation can be included.