Pages

Wednesday, November 17, 2010

Finding a Missing Java Class at Compile Time

As a developer I've run into this scenario many times - my code won't compile because of a missing reference to some third party class in some JAR file that I can't possibly find.

On many occasions I've used findjar. Just pop in the class name that the compiler is complaining about and this handy site will not only tell you which JAR it lives in, but will also provide a link to the location it can be downloaded.

But today I ran into a more difficult case. Findjar doesn't work well with proprietary JARs like those found in IBM's Websphere Portal Server. I remember a long time ago reading about a utility that could find a JAR file by loading up a given classpath and quickly finding a class on that path.

A quick google search yielded something even better, Jarscan. Jarscan is a utility that will scour a given path on your filesystem, collecting all the JARs it finds and then tells you where your elusive class lives.
Please note that generic comments containing links with the intent of self promotion will be flagged as spam and deleted.

0 comments:

Post a Comment

Are you about to post a generic comment that has nothing to do with this post? Something like "Hey thanks for this very valuable information, BTW here's my website". If so, it will be marked as spam and deleted within 24 hours.

Note: Only a member of this blog may post a comment.