image provider

Which And What Utilities


Disclaimer

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. Everything I have prepared to help you is right here.

This project outline is not like the artificial, tidy little 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 by profession, 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 endeavour.

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. e.g. Ideally this is runs on any platform unmodified, though if you find yourself needing JNI (Java Native Interface), try at least to support both Windows and Linux, using JWS (Java Web Start) to select the correct native class.
Interface Finder: find classes on classpath implementing a given inteface
jar
jar verifier Project
JarCheck
JarLook
Java Jar Catalog Project
JWhich
Path and Classpath tool project

This page is posted
on the web at:

http://mindprod.com/project/which.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\project\which.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[3.15.193.45]
You are visitor number