Home   Info   DevZone   Wiki  
UsersWeb  |  MainWeb  |  InfoWeb  |  DevZoneWeb  |  SupportWeb
JarSearchUtility ] [ not logged in ] [ Web: DevZone ] goto:  options
[ get info on or edit ] login or new user ] [ list of topics, hubs & nodes, or recent changes ]

News2004


Introduction

Java classes are often distributed in ZIP-compatible Java Archive files, or JARs. The Jar Search Utility enables you to search many jar files for a specific class.

When used

The following scenario demonstrates the value of a tool like Jar Search Utility.

Let's say that you are trying to deploy a third-party web application and you find the following message in your log file. As expected, this message tells you the name of a missing class.

  class not found: org.jos.demo.Demo

A third-party web application might include certain jars in its WEB-INF/lib directory. Some jars should be included and some should not. It can be difficult to know which to include.

Unfortunately, the name of a jar is not possible to predict. There is no naming convention for jars, except for maybe the ".jar" extension. It is not possible to extract the name of the missing jar from a class name.

Do you search the Internet? As yet, there is no industry registry to look up the jar name for a given class.

Do you contact the support group for the third-party? It might be possible to solve the problem if you could easily search all of your JARs for the missing class. If you have deployed other third-party web applications, you may already have the missing jar, but not in the right directory. This is a good first step, even when it escallates to contacting another group for support.

Example

The following example illustrates how to search all JARs in the josdemo directory (and all of its subdirectories) for the org.jos.demo.Demo class.
run:program:gchii.tools.junior1a.JarSearchUtility/josdemo?class=org.jos.demo.Demo
This utility displays the name of the jar and the corresponding class file.


Content of these pages are owned and copyrighted by the poster.
Hosted by: