Forrest logo
tool overview
On this page you find all important commands for the CLI tool jdeps. If the command you are looking for is missing please ask our AI.

jdeps

jdeps is a command line tool in Java Development Kit (JDK) that stands for Java Dependency Analysis. It helps in analyzing the dependencies of a Java program or library.

  1. jdeps is used to determine the dependencies between classes and packages in a Java application. It helps developers understand the relationships and interactions within their code.

  2. The tool can be executed by typing "jdeps" followed by the name of the Java archive (JAR file), class file, or directory you want to analyze.

  3. jdeps analyzes static dependencies, which means it examines the compile-time dependencies based on the import statements and class references in the bytecode.

  4. The output of jdeps includes a list of classes or packages that a particular class depends on, as well as any circular dependencies or missing dependencies that may exist.

  5. It provides insights into the structure and architecture of an application, making it useful for identifying potential issues, such as fragile dependencies or packages that should be decoupled.

  6. jdeps can also generate a graphical representation of the analyzed code's dependencies using the "--dotoutput" flag. This can be useful for visualizing complex dependencies.

  7. The tool can also generate various reports, including summary information, API usage, and module dependencies, which provides detailed information about the dependencies of a Java module.

  8. jdeps supports different options to customize the analysis, like filtering packages, specifying classpath or module path, and analyzing multi-release JAR files.

  9. It can be used to migrate applications to newer Java versions by identifying deprecated, removed, or changed APIs that might break compatibility.

  10. jdeps is a valuable tool for developers, architects, and maintainers to analyze, debug, and improve the quality, stability, and maintainability of Java applications and libraries.

List of commands for jdeps:

  • jdeps:tldr:19f43 jdeps: Analyze the dependencies of a `.jar` or `.class` file.
    $ jdeps ${filenamename-class}
    try on your machine
    explain this command
  • jdeps:tldr:60b03 jdeps: Print a summary of all dependencies of a specific `.jar` file.
    $ jdeps ${filenamename-jar} -summary
    try on your machine
    explain this command
  • jdeps:tldr:67dc6 jdeps: Output the results of the analysis in a DOT file into a specific directory.
    $ jdeps ${filenamename-jar} -dotoutput ${path-to-directory}
    try on your machine
    explain this command
  • jdeps:tldr:87bae jdeps: Display help.
    $ jdeps --help
    try on your machine
    explain this command
  • jdeps:tldr:8c0f5 jdeps: Print all class-level dependencies of a `.jar` file.
    $ jdeps ${filenamename-jar} -verbose
    try on your machine
    explain this command
tool overview