Which And What Utilities  Which And What Utilities

go to home page Student Projects full screen, hide local find menu Google search web for more information on this topic jump to foot of page translate this page with Babelfish ©1996-2009 Roedy Green, Canadian Mind Products
This essay does not describe an existing computer program, just one that should exist. This essay is about a suggested student project in Java programming. This essay gives a rough overview of how it might work. I have no source, object, specifications, file layouts or anything else useful to implementing this project.

This project outline is not like the artificial tidy problems you are spoon-fed in school, when all the facts you need are included, nothing extraneous is mentioned, the answer is fully specified, along with hints to nudge you toward a single expected canonical solution. This project is much more like the real world of messy problems where it is up to you to fully the define the end point, or a series of ever more difficult versions of this project, and research the information yourself to solve them.

Everything I have to say to help you with this project is written below. I am not prepared to help you implement it; or give you any additional materials. I have too many other projects of my own.

Though I am a programmer, I don’t do people’s homework for them. That just robs them of an education.

You have my full permission to implement this project in any way you please and to keep all the profits from your endeavor.

Please do not email me about this project without reading the disclaimer above.

This is similar to the PathTool project. These are some simple command line diagnostic tools:

  1. which p.exe This searches the current path for the given executable file (fully qualified). It then displays all the occurences it finds, i.e. the fully qualified directories where it found that file, and sets the return code to the number of instances it finds.
  2. which X.Y.P.class does the same thing, but search the classpath, including any jars in the classpath for instances of X.Y.P.class. You can use simple wildcards such as *.P.class to look for the class in any package. *.*.class would get you a list of all classes available on the classpath. The search is case insensistive, but since Java is case sensitive, only case sensitive matches appear in the count. Case mismatches are highlighted.
  3. which getSize.method does the same thing, but search the classpath, including any jars in the classpath for instances of classes containing a getSize method. More elaborate versions would let you specify a more specific method signature. The utility should take a -cp option on the command line, defaulting to the SET classpath if there is none.
  4. what C:\temp\ThisFile.class Displays the fully qualified classname of the class corresponding to the file.
  5. what C:\temp\ThisJar.jar Displays the fully qualified classnames of all the classes in the jar.
Your what utility might be expanded to tell you interesting facts about other types of file. Eg. Ideally this is runs on any platform unmodified, though if you find yourself needing JNI, try at least to support both Windows and Linux, using JWS to select the correct native class.
Interface Finder: find classes on classpath implementing a given inteface
jar
jar verifier Project
JarCheck
JarLook
Java class finder: searches local disk jars for classes
Java Jar Catalog Project
Path and Classpath tool project

CMP homejump to top You can get the freshest copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/project/which.html J:\mindprod\project\which.html
CMP logofeedback Please email your feedback for publication, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email
mindprod.com IP:[65.110.21.43]
view BlogYour face IP:[38.107.191.100]
You are visitor number 5,767.