On this page
Export & analyze Java/JVM projects with jdeps 🔗
jdeps is the JDK's own dependency analyzer. It ships with every JDK, so this workflow needs no extra tooling — great for Java projects or when you can't (or don't want to) enable SemanticDB. Your build already produced the .class files; the only extra step is piping jdeps output to a text file.
jdeps data is class-level: it has no file information, so codeps emits only package metrics and omits the Files tab. It also carries no access information, so all nodes have ports/mutPorts 0 and dependentsPerPublicPort null — a known gap, not silently meaningful.
Generating the input 🔗
jdeps -verbose:class -filter:none -cp classes classes > jdeps.txt
-verbose:classis required — codeps reads the indented per-class detail lines-filter:nonekeeps all edges (JDK-internal noise likejava.*can be filtered later withexclude)
Configuring and analyzing 🔗
Point a project at the jdeps text file in .codeps/config.yaml; codeps status parses it and computes metrics in one step:
projects:
app:
root: .
source: jdeps
inputs: [jdeps.txt]
codeps status
Only the project's own classes appear — the parser drops edges to external classes that are not themselves defined in the input.
Cycles, change propagators (fanIn/fanOut), surface risk, and orphans are all computed the same way as for SemanticDB input — see the Metrics report. Note that cut analysis is not currently exposed by the CLI, so cutAnalysis.status is always notRequested.
Filtering JDK noise 🔗
The raw jdeps -verbose:class output includes edges to java.*, scala.* and other platform classes. Exclude them in the config to keep the graph focused on your code:
projects:
app:
root: .
source: jdeps
inputs: [jdeps.txt]
include: [com.example]
exclude: [com.example.internal]
Note: excludes are package prefixes matched against each node's root package. To filter JDK noise in this example, use
exclude: [java, scala]; these are package prefixes, not file globs (see Include / exclude patterns).
Collapsing 🔗
Just like with SemanticDB input, the collapse config field applies:
collapse: [com.example.modules.**]
See CLI reference for the full configuration field list.