Program 4
- Assigned date: October 23, 2003
- Due date: November 11, 2003 (@5:30 p.m.)
- Delivery mechanism:
- Demo at De Anza Lab with appointment +
- Hard copy (compiled .java source code + output of program)
- Grade: 100 points on
time or 50 points for late.
Program description:
This program deals with Java reflections and swing component (GUI
programming). You will read a .jar file
(name of the .jar file will be passed as an argument to your driver
program) and reverse engineer the content of the .jar file. A .jar
file is a jar of one or more .class files (each .class can represent
an interface or a class). Your job is to write a very simple
class browser for the .jar file read.
A leaf element will be class's constructors (for interfaces there
will not be any constructors), methods, and fields.
What is a reverse enginnering of a .jar file? It means that for each
.class file you need to emit the necessary information such as:
- class/interface name
- constructors
- fields
- methods
Program Output:

You may use java.util.jar (JarFile, ...) and other packages to extract
the
.jar elements and the use the Java's reflection classes/interfaces to
reverse engineer the elements.
To see the table of contents of a .jar file:
jar t < file.jar
Grading Policy
Your program will be graded based on:
- correct solution (50 points)
- Java DOC style documentation (10 points)
- Using proper swing components (20)
- design (20 points)
- BONUS (5-20 points if you qualify)(depends on how good your GUI
is)
Input .jar File
Input .jar File will be provided on Tuesday, November 4, 2003.
You may test your program with other .jar files.