liveBook · Manning

Clojure.java.javadoc

As explained in Clojure: The Essential Reference

clojure.java.javadoc is a Clojure namespace that organizes Javadoc locations and opens Java documentation through a system browser.

clojure.java.javadoc helps Clojure programmers find Java API documentation without leaving the REPL. It resolves documentation for a value’s class and opens the result in the system browser. section 22.0 section 22.10

The namespace combines lookup with configurable documentation locations:

  • javadoc opens documentation for a class or object, such as a string, in the native browser. section 22.10
  • add-remote-javadoc associates package prefixes with online Javadoc roots; add-local-javadocs supports local documentation. section 22.10 section 23.15
  • The lookup database uses *local-javadocs* and *remote-javadocs*, while *core-java-api* identifies the core Java documentation URL. section 23.15

Register documentation for the running Java version

Require the namespace, derive a Java-version-specific Oracle URL, and register it for common Java package prefixes. This lets subsequent javadoc calls target a matching remote API rather than the old default. section 22.10

When no registered documentation matches, *feeling-lucky* can try a search-engine URL, although the historical Google behavior no longer works reliably. Bind *feeling-lucky-url* to another service when needed; disabling the fallback produces a clear lookup failure. section 23.15

How Clojure: The Essential Reference covers it

How deep it goes
Explains class lookup, package-prefix registration, dynamic configuration, and fallback search behavior, but not Javadoc generation internals.
Examples
Uses String lookup, Java-version URL registration, missing PersistentVector documentation, custom search fallback, and local JDK documentation.
What it assumes
Assumes basic Clojure REPL use and familiarity with Java classes while demonstrating the documentation lookup workflow directly.
What you can do after
Operate the REPL documentation workflow, register Java API locations, and diagnose missing Javadocs or unreliable search fallback.
How it connects
Connects Javadoc with the REPL, system browser, Java packages, dynamic variables, and local or remote documentation repositories.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Clojure: The Essential Reference. The section links point to the parts of the book it draws on.