## Compiling jCVS

This document attempts to address the task of compiling the jCVS application.

## Source Code Structure

The layout of the source code for jCVS is not arbitrary. Unlike most development environments, Java defines a very rigid set of 'rules', which are so integrated into the operation of the Java compiler and interpretter that resistance is nearly futile.

In the Java world, what most people would think of as libraries or applications, are defined to be packages in Java. jCVS has two packages:

- com.ice.cvsc - The CVS client support package.
- com.ice.jcvs - The jCVS application, a cvs client.

In the Java world, the dots in the package name are considered file system directory nodes. Thus, the com.ice.cvsc package has its source code files in a directory named 'cvsc' that is inside of a directory named 'ice', which is inside of a directory named 'com'. Further, Java recommends that these package names begin with the inverted domain name of the entity creating the package. This provides a tremendous global name space. Finally, files that are not considered part of a specific package live in the implied 'non-package', which lives at the top level of the source code tree.

Since CVSApplication.java does not belong to a package, it lives at the top of the source tree. Therefore, in your jCVS source tree, at the top level (the 'source' directory), you will find the file 'CVSApplication.java' and the directory 'com'. Inside of 'com' you will find the directory 'ice', which will include the directories 'cvsc' and 'jcvs'.

## Compiling jCVS

When the Java compiler is invoked to compile a class, you can instruct the compiler to also compile any other class that the class being compiled may depend on. We will leverage this functionality to compile the entire jCVS source tree.

To comile the jCVS application, change your working directory ('cd') to the 'source' directory that was extracted from the jCVS archive. Now, type this command:

javac -depend CVSApplication.java

If all goes well, the compiler will start compiling the CVSApplication.java code, and in the process of dealing with dependencies, will compile all of the '.java' files in both com/ice/cvsc and com/ice/jcvs. This will take a minute or two, depending on your platform.

## Running The Compiled jCVS

If all went well, and javac reported no errors, you can try to run from the newly compiled jCVS. However, before you can run in the 'source' directory, you will need to copy the required files to the 'source' directory from the 'application' directory. The required files are:

- The entire contents of the 'images' directory.
- The 'Properties.txt' file.
- The 'Projects.txt' file.

Once these files are copied, the 'source' directory should contain the following:

- File 'CVSApplication.java'
- File 'CVSApplication.class'
- File 'Properties.txt'
- File 'Projects.txt'
- Directory 'images'
- Directory 'com'

Once the required files are copied into the 'source' directory, you are ready to run from the newly compiled jCVS. Type this command:

java CVSApplication

This should start the Java interpretter, and after a moment, display the jCVS main window.

$Id: Compiling.html,v 2.1 1997/04/19 05:12:57 time Exp $
Copyright (c) 1997 By Timothy Gerard Endres
jCVS is licensed to you under the GNU General Public License.