After you have tested your program extensively, you can try to
run the tests required for submission.
You will do this by opening up an MS-DOS window.
It may be possible to do it in JCreator, but it will be difficult
because you will not have the source code for the test program.
Before you get too far, from an MS-DOS window, run
java -version
and make sure you are seeing the correct Java Virtual Machine.
If you are not, updated the PATH Environment variable
(see below; the process is similar to updating the
CLASSPATH environment variable).
Download assign4.jar,
and place it (the jar file name, assign4.jar) on your classpath.
The test program is Assign4 which you can run once the jar file
is on the classpath
Of course, the cop3530
package must reside in a directory named cop3530
that is also on the classpath. If all else fails, you can extract
the class files from the jar file, but there is no reason why you
should have to do this.
If you have to extract the jar files, the command
(assuming a properly set PATH variable) is
jar xvf assign4.jar
To set the CLASSPATH, you can go to CONTROL PANEL, then SYSTEM,
then select the Advanced tab, click Environment Variables, and
add a new User entry. The CLASSPATH should include at least
.;C:\your folder when assign4.jar is\assign4.jar
If there is already a CLASSPATH entry,
then just update the one that is
already there.
Similarly, to update PATH
add the bin folder where the Java system resides.
On many home computers this is the equivalent of
C:\jdk1.3\bin.
The main routine is in class Assign4. Note the
capitalization in Assign4. To run from the
command line, you will need to say
java Assign4
once the CLASSPATH is appropriately set, or the jar file
is extracted into the component .class files.
I will do a demo of this on Tuesday in class; but you really should
try it on your own first.