Using the JDK

(Thanks go to Ray Ortigas for making this 324-specific.)

The jdk has a very simple, command-line interface. There are no icons, mouse clicks, and so on.

There are some rules about what files your code must go into. The simplest thing is to put each public class into its own file. Each such file must be named after the class, with the extension ".java". For example, a Grid class would go into a file called Grid.java, LiveCell would go into LiveCell.java, and so on.

Java maps the package hierarchy to a directory hierarchy in the file system and the directories have the same name. However, the consequence of this is that you must compile your classes from the root of this hierarchy.

Change your current directory to the *parent* directory of "csc324". So if this is "~/jws/A1", then enter

	cd ~/jws/A1
(So "~/jws/A1" is the root mentioned above.) Then, to compile the Driver class, enter

	javac csc324/driver/Driver.java
To compile the other classes in clothes, enter:

	javac csc324/clothes/*.java
To run the driver, enter:
	java csc324.driver.Driver
Note that the last two commands are run in "~/jws/A1" as well.