"jdeps jar_file" - Dependencies of JAR File

This section provides a tutorial example on how to use 'jdeps' command to show package level dependencies of a given JAR file.

If you want to know package level dependencies of a given JAR file, you can run the "jdeps jar_file" command.

Let's use the JAR file, jrt-fs.jar, in JDK 12 as an example:

herong> jdeps "\Program Files\Java\jdk-12.0.1\lib\jrt-fs.jar"

Warning: split package: jdk.internal.jimage jrt:/java.base
   \Program Files\Java\jdk-12.0.1\lib\jrt-fs.jar

Warning: split package: jdk.internal.jimage.decompressor jrt:/java.base
   \Program Files\Java\jdk-12.0.1\lib\jrt-fs.jar

Warning: split package: jdk.internal.jrtfs jrt:/java.base
   \Program Files\Java\jdk-12.0.1\lib\jrt-fs.jar

jrt-fs.jar -> java.base
   jdk.internal.jimage   -> java.io                            java.base
   jdk.internal.jimage   -> java.lang                          java.base
   jdk.internal.jimage   -> java.lang.invoke                   java.base
   jdk.internal.jimage   -> java.lang.ref                      java.base
   jdk.internal.jimage   -> java.lang.reflect                  java.base
   jdk.internal.jimage   -> java.nio                           java.base
   jdk.internal.jimage   -> java.nio.channels                  java.base
   jdk.internal.jimage   -> java.nio.file                      java.base
   jdk.internal.jimage   -> java.nio.file.attribute            java.base
   jdk.internal.jimage   -> java.security                      java.base
   jdk.internal.jimage   -> java.util                          java.base
   jdk.internal.jimage   -> java.util.concurrent               java.base
   jdk.internal.jimage   -> java.util.function                 java.base
   jdk.internal.jimage   -> java.util.stream                   java.base
   jdk.internal.jimage   -> jdk.internal.jimage.decompressor   jrt-fs.jar

The output tells us that:

If you want to see class level dependencies, you use the "jdeps -verbose jar_file" command.

Table of Contents

 About This Book

 Java Tools Terminology

 Java Tools Included in JDK

 javac - The Java Program Compiler

 java - The Java Program Launcher

 jar - The JAR File Tool

 jlink - The JRE Linker

 jmod - The JMOD File Tool

 jimage - The JIMAGE File Tool

 jpackage - Binary Package Builder

 javadoc - The Java Document Generator

jdeps - The Java Class Dependency Analyzer

 jdeps - Class Dependency Analyzer Command

 "jdeps class_file" - Dependencies of Class File

 "jdeps -verbose" - Class Level Dependencies of Class File

"jdeps jar_file" - Dependencies of JAR File

 "jdeps --inverse --require ..." - Reverse Dependencies

 jdeprscan - The Java Deprecated API Scanner

 jdb - The Java Debugger

 jcmd - The JVM Diagnostic Tool

 jconsole - Java Monitoring and Management Console

 jstat - JVM Statistics Monitoring Tool

 JVM Troubleshooting Tools

 jhsdb - The Java HotSpot Debugger

 jvisualvm (Java VisualVM) - JVM Visual Tool

 jmc - Java Mission Control

 javap - The Java Class File Disassembler

 keytool - Public Key Certificate Tool

 jarsigner - JAR File Signer

 jshell - Java Language Shell

 jrunscript - Script Code Shell

 Miscellaneous Tools

 native2ascii - Native-to-ASCII Encoding Converter

 JAB (Java Access Bridge) for Windows

 Archived Tutorials


 Full Version in PDF/EPUB