Things change on our developer machines. If you notice anything wrong with
these instructions, please let the TA know. Similarly, if you feel some topic
is missing, let us know as well. Shells
are an important concept in Unix. There are many different shells out there so
it's important to find one you're comfortable with. We use the Bourne-Again
Shell (BASH) so that's what most of these instructions will be geared towards. Ant
is a Java-based build tool that makes managing and building your Java projects
MUCH easier. For more details on Ant, make sure you check out the Ant User's
Manual. The Ant setup script calls the setup script for the Java
1.5.0_06 JDK so all we have to do is call the Ant setup script in our .bashrc file. Junit is a testing
framework for Java programs. It is used for unit testing Java programs; you
will be doing a lot of unit testing in class. #export
JAVA_HOME=/usr/usc/jdk/1.5.0_06 export
JAVA_HOME=/usr/usc/jdk/default export
CLASSPATH=$CLASSPATH:/home/scf-22/csci201/junit4.5/junit-4.5.jar Setting Up For csci201
Disclaimer
Preparing
your Bash Shell
-
See
if you have a .bashrc file in your login directory.
If not, simply create an empty one.
-
To
invoke the bash shell simply type bash at the prompt of the shell you are in.
That will execute the commands in .bashrc file.
-
Follow
the next set of directions to modify your .bashrc
file.
Setting
up Java, ANT, and JUnit
For example, using emacs, type:
>emacs ~/.bashrc
export PATH=/usr/usc/ant/default/bin:$PATH
ulimit -v 1840000
>source ~/.bashrc
java -version
You should see a message reading java version "1.5.0_06" or
something similar.
>ant
You should see a message saying that build.xml does not exist. That means
Ant and Java are installed and working correctly.