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

Related

  • The Hidden Cost of AI-Generated Frontend Code
  • Why DDoS Protection Is an Architectural Decision for Developers
  • The Platform or the Pile: How GitOps and Developer Platforms Are Settling the Infrastructure Debt Reckoning
  • Amazon Q Developer for AI Infrastructure: Architecting Automated ML Pipelines

Trending

  • This One Spring Data JPA Pattern Cleaned Up to 3 Years of Repository Debt
  • What Nobody Tells You About Running AI Models in Docker
  • Retrieval Augmented Generation With Spring AI 2.0, Claude, and PGvector
  • AI in SRE: A Practical Autonomy Model for Self-Healing Infrastructure

JAR Searcher Developer Tool

Often, Java Developers — Especially Those Working on Large Java EE Code — Realize that they are Facing Multiple Classpath Issues.

By 
Sumith Puri user avatar
Sumith Puri
·
Feb. 17, 21 · Code Snippet
Likes (6)
Comment
Save
Tweet
Share
4.2K Views

Join the DZone community and get the full member experience.

Join For Free
As a Java/J2EE developer, I know that the most commonly faced issue in development, which has also been reported as the primary reason for developers losing hair — missing classpath files or not being able to trace a JAR which contains the file — when you know you have all JARs that could possibly exist in this world on your local file system.

Just wrote this simple tool, JarSearcher v1.0, which accepts the name of the class file you are looking for and returns all the JARs on your system which contain this file. Also, for Windows developers, I have added a .bat file (Unix folks, kindly replicate .sh) which takes the following form for execution:

js [class-name] [start-in] -c
 
[class-name] — The name of the class file to search (without .class)
[start-in] — The directory in which to start looking for the files.
-c — This switch will toggle display of processing information.

Or you can directly invoke the program from the bundled JAR file:
 
java -jar jar-searcher.jar [class-name] [start-in] -c


I have included the source, feel free to modify it as per your convenience.
 
JAR (file format) dev

Published at DZone with permission of Sumith Puri. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • The Hidden Cost of AI-Generated Frontend Code
  • Why DDoS Protection Is an Architectural Decision for Developers
  • The Platform or the Pile: How GitOps and Developer Platforms Are Settling the Infrastructure Debt Reckoning
  • Amazon Q Developer for AI Infrastructure: Architecting Automated ML Pipelines

Partner Resources

×

Comments

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

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

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 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook