DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • While Performing Dependency Selection, I Avoid the Loss Of Sleep From Node.js Libraries' Dangers
  • Why I Started Using Dependency Injection in Python
  • Understanding ldd: The Linux Dynamic Dependency Explorer
  • Understanding the Two Schools of Unit Testing

Trending

  • Designing a Java Connector for Software Integrations
  • Mastering Advanced Aggregations in Spark SQL
  • Infrastructure as Code (IaC) Beyond the Basics
  • The Future of Java and AI: Coding in 2025
  1. DZone
  2. Software Design and Architecture
  3. Security
  4. JDeps: Simple Dependency Analysis

JDeps: Simple Dependency Analysis

Learn about a nifty new utility that creates simple dependency graphs of Java CLASS files.

By 
Siva Prasad Rao Janapati user avatar
Siva Prasad Rao Janapati
·
May. 09, 16 · Code Snippet
Likes (6)
Comment
Save
Tweet
Share
12.6K Views

Join the DZone community and get the full member experience.

Join For Free

In Java 8 we have a new command line tool called jdeps to know the Java dependencies. It is a nice tool to do static analysis and find out the .class/jar dependencies.

For example, I have a class and wanted to know the dependencies summary as DOT (graph description language) format I can get it by issuing the below jdeps command.

D:\>jdeps -dotoutput .  -cp jsoup-1.7.2.jar D:\classes\org\smarttechies\harvester\ProductInfoHarvester.class

Here -dotoutput <dir> option generates the DOT file for given class/jar archive and a summary DOT file under the given directory.

From the above example, jdeps generates package level dependency. The DOT visualization is given below.

jdeps package level dependency

If we want the verbose class level dependency, we can generate by passing -v option to the jdpes.

D:\>jdeps -dotoutput . -v -cp jsoup-1.7.2.jar D:\bin\org\smarttechies\harvester\ProductInfoHarvester.class

From the above example, jdeps generates classlevel dependency. The DOT visualization is given below.

jdeps class level dependency

If you want to know more options get it from help jdeps -help

Dependency

Opinions expressed by DZone contributors are their own.

Related

  • While Performing Dependency Selection, I Avoid the Loss Of Sleep From Node.js Libraries' Dangers
  • Why I Started Using Dependency Injection in Python
  • Understanding ldd: The Linux Dynamic Dependency Explorer
  • Understanding the Two Schools of Unit Testing

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: