Javadoc is Java’s documentation markup and command-line tool for generating HTML API documentation from documented source code. The output uses folders and subfolders plus an index.html, making APIs available for browser-based offline or online lookup. section 22.10
Clojure developers can use clojure.java.javadoc to open documentation directly from the REPL. The javadoc function resolves local or remote package locations before optionally trying a search-based fallback. section 22.10 section 23.15
Practical configuration includes:
- Register remote documentation with add-remote-javadoc, including URLs selected from the current Java version. section 22.10
- Register local documentation with add-local-javadocs or bind *local-javadocs* for a JVM session. section 23.15
- Customize *remote-javadocs*, *feeling-lucky*, and *feeling-lucky-url* when defaults do not locate the desired API. section 23.15
Open documentation from the REPL
Require the namespace and pass a Java object or class-like value: (require '[clojure.java.javadoc :as browse]) followed by (browse/javadoc "this is a string object"). The function opens the String documentation and returns true; undocumented values can fail unless a fallback is enabled.
