Java Search Class in Jar. Update – moved to Google Code

Working as a Java Developer and working across multiple projects there is one frequent error which i have encounterd is “Exception in thread "main" java.lang.NoClassDefFound Error:". The reason for this error is missing class file from the CLASSPATH.

This sometimes becomes very frustrating when you have to search for missing class in a set of JAR files. To make it bit easier i have written a small java utility which searches for class file in all jar files present in a particular directory.

I am making it available for download below and also a sample of what it can do.

C:UtilsJar Search>java -jar jarSearch.jar C:WorkJar WSDL2Java

Found WSDL2Java as org/apache/axis/wsdl/WSDL2Java.class in C:WorkJaraxis.jar

Time taken 0s

Download Here.

Update: I have moved this project to Google Code. Any new downloads will be available from here. I have also updated utility to work with swt based gui. Please locate platform specific swt.jar from here and put it in same folder as JarSearch.jar. Execute using “java -jar JarSearch.jar”

Add to: Facebook | Digg | Del.icio.us | Stumbleupon | Reddit | Blinklist | Twitter | Technorati | Furl | Newsvine

~ by Vivek on September 20, 2008.

2 Responses to “Java Search Class in Jar. Update – moved to Google Code”

  1. needs a proper gui, but it works fine. Thanks!

  2. This works well if you have the jar file locally, but this isn’t always the case.

    We set up a site a few years ago to solve this problem. It allows you to search a huge repository of classes (I think we currently index a little over 2.6 million) and return a list of jars that provide them. You can also do lookups the other way and even search by md5sum (handy when you’ve got a jar on your classpath without any version information).

    You can find us at

    http://www.jarfinder.com

Leave a Reply