William and Mary Billiards

Developer Help

This page contains help topics related to the developers' questions and needs.


CVS

Within CS Department

To access our CVS repository from within the department (or by ssh'ing to a departmental machine), set your CVSROOT environment variable. If your shell is csh:

setenv CVSROOT /home/f85/coppit/classes/csci435/cvsroot

You may want to add this to your .profile or .cshrc file so you don't have to do it every time you log in.

Outside CS Department

From outside the department (i.e. if you have cvs installed on your home machine), you will need to tell CVS to use a secure connection, and set your CVSROOT to a remote location:

setenv CVS_RSH ssh
setenv CVSROOT :ext:<USERNAME>@<COMPUTER>.cs.wm.edu:/home/f85/coppit/classes/csci435/cvsroot

Replace <USERNAME> and <COMPUTER> with appropriate values. (Any CS department computer should work.) You may get tired of typing your password. If so, and you trust the computer you're working from, you can set up SSH to use a private and public key pair for password-less logins. There are a number of guides on the web for how to do this. Here is one, and another, and another. If you use Windows, you might be interested in PuTTY.

Permissions Problems

I've asked techie to put all the class members in the cs435 group. This should allow all of us to updated the CVS repository at the same time. Let me know if you run into problems executing CVS commands. If you are having problems, look in the CVS root directory above and find out who owns the file with improper permissions (using ls -l). Then email them and ask them to run fix_cvs_perms, a script that should fix everything.

Binary Files

When you first check in a file, be sure to use the -kb flag so that CVS will know that it's binary and will store it correctly. I've created a cvswrappers file in the repository that should take care of this automatically for certain file types.

Apache Ant

Installation Instructions (Ant and JavaDoc presentation)

Developer Quickstart

JUnit

JUnit presentation

To use, first set your environment variable:
setenv CLASSPATH /home/f85/coppit/classes/csci435/junit/junit.jar:/home/f85/coppit/classes/csci435/junit/

Test that JUnit works by typing:
java junit.textui.TestRunner junit.samples.AllTests

Then refer here if you need more help.

Java3D

Java3D Background

According to Sun,

Java 3D is a high level, scene graph based API. It uses either DirectX or the OpenGL low level API to take advantage of 3D hardware acceleration. This gives the platform-indepedence one expects from a Java API along with the high level of performance needed by today's sophisticated 3D applications.

Additional information can be found at Sun's site, including documentation and some FAQs.

Using Java3D

Developers can use Java3D in Java applications simply by installing it and using its packages, like javax.media.j3d and javax.vecmath. Java3D must be installed into a standard Java2 SDK directory, so the 1.4.2_04 SDK and Java3D have already been installed to Prof. Coppit's filespace; all that remains is setting some environment variables. Here are the corresponding tcsh commands:

  1. setenv JAVA_HOME /home/f85/coppit/classes/csci435/java3d/j2sdk1.4.2_04/
  2. set path=(/bin /usr/bin /usr/X11R6/bin /usr/local/bin /home/f85/coppit/classes/csci435/java3d/j2sdk1.4.2_04/bin /usr/local/jdk/bin ~/bin $ANT_HOME/bin .)

The crucial part about setting the path is that the location of our Java3D'ed SDK bin be placed before the normal Java bin location, /usr/local/jdk/bin. That location could probably just be removed from the path, but as long as it's after the new location, command lookups will go to the Java executables (java, javac, etc.) in the new location.

Testing Java3D

Developers can check that everything is set up correctly by running one of the demo programs included with Java3D (located in /home/f85/coppit/classes/csci435/java3d/j2sdk1.4.2_04/demo/java3d/). For example, to run the SphereMotion demo, simply type the following commands:

  1. cd /home/f85/coppit/classes/csci435/java3d/j2sdk1.4.2_04/demo/java3d/SphereMotion
  2. java SphereMotion

That should bring up a window displaying a large green sphere and orbiting red satellite.

There are several dozen demos to try, some of which look quite impressive, so have fun trying stuff out while getting a feel for what Java3D can do.

Valid HTML 4.01!