Motivation
Every cellar command currently requires either a project (get / list / search) or a Maven coordinate (get-external / list-external / search-external / deps). There is no way to query the JDK standard library on its own.
In practice the JRE classpath is already resolved and loaded as the base for every query (via --java-home / the jrt path), but it can't be inspected directly — to look up java.util.HashMap or java.lang.String you have to pick some arbitrary published artifact and query that, which is awkward and non-obvious. Agents frequently want JDK API info and have no clean way to get it.
Proposed
A first-class way to query the JDK with no project and no coordinate, e.g.:
cellar get-jdk java.util.HashMap
cellar list-jdk java.util
cellar search-jdk HashMap
(naming TBD — could also be a --jdk flag on the existing *-external commands). It should honor --java-home to choose which JDK to inspect, and otherwise default to the same JRE resolution the other commands already use.
Notes
- The underlying machinery already exists:
JreClasspath.jrtPath resolves the JRE classpath and AllSymbolsStream excludes those entries for normal queries. This feature would essentially run the existing handlers with the JRE classpath as the target rather than the excluded base.
Motivation
Every cellar command currently requires either a project (
get/list/search) or a Maven coordinate (get-external/list-external/search-external/deps). There is no way to query the JDK standard library on its own.In practice the JRE classpath is already resolved and loaded as the base for every query (via
--java-home/ the jrt path), but it can't be inspected directly — to look upjava.util.HashMaporjava.lang.Stringyou have to pick some arbitrary published artifact and query that, which is awkward and non-obvious. Agents frequently want JDK API info and have no clean way to get it.Proposed
A first-class way to query the JDK with no project and no coordinate, e.g.:
(naming TBD — could also be a
--jdkflag on the existing*-externalcommands). It should honor--java-hometo choose which JDK to inspect, and otherwise default to the same JRE resolution the other commands already use.Notes
JreClasspath.jrtPathresolves the JRE classpath andAllSymbolsStreamexcludes those entries for normal queries. This feature would essentially run the existing handlers with the JRE classpath as the target rather than the excluded base.