|Available||Feb 1, 2012|
|Due||11:59pm, Feb 12, 2012|
ObjectivesThe purpose of this project is to test your ability to define the appropriate Java directory structure, use Ant to run and compile your code, use CVS to submit your projects and to use the CVS utilities to verify your submittal.
DescriptionFor this project you will create a small Java program follwing all steps necessary for successful completion of all projects for this course.
- Follow the directions in using CVS to check
out the project 0 repository. The following commands should work when run
from any gl machine (be sure to use your gl username in the second command):
cd your-341-directory cvs -d /afs/umbc.edu/users/f/r/frey/pub/cs341s12/Proj0 checkout -d MyProj0 your_username
- Clean out any unnecessary garbage from your checked out folder using:
cd MyProj0 ls -- listing your contents cvs remove junk.txt -- removes the file from your repositoryThe only file that should remain is the build.xml file used by ant. This file will be provided by us for all projects and will need to be editted.
- Create the appropriate Java package directory structure required by Ant
assuming your source code will in a Java package named proj0.
cd MyProj0 -- the root of your project directory tree mkdir src -- the root of your source code directory tree mkdir src/proj0 -- a directory for your .java files in the proj0 package mkdir bin -- where the compiler will place your .class files
- Write the standard "Hello World" program, in a
file named Proj0.java in your MyProj0/src/proj0 directory.
This project must be in a Java package named proj0. For example:
cd MyProj0/src/proj0 emacs Proj0.javaAfter invoking emacs, or your favorite text editor, write the code for "Hello World" in Proj0.java, save it, and exit the editor. From your MyProj0 directory (where your build.xml file is located), execute the command
ant runThis should cause some (intentional) Ant errors that you will need to fix as we discuss in class. Edit the build.xml file appropriately until this command runs without error. Remember, that Ant requires a very specific heirarchy (see above) in order to execute the compile, run and doc commands. Don't forget about Ant task dependencies as well.
- Follow the directions on using CVS to add
your directories, .java files and XML files to the repository.
Then, checkin/commit your Proj0.java and build.xml files for grading.
Do not checkin/commit any other files.
Remember to provide a comment when committing your files to CVS. Use the -m flag
or enter a comment in the editor. When you exit the editor (DO NOT ABORT the editor)
your commit will be finalized.
- After checking in your files, verify that your code has been submitted succesfully by using the CVS Utilities kindly provided by Dan Hood.
Project GradingThe 15 points for this project are divided into two parts.
- 5 points for successfully removing junk.txt from your repository
- 10 points for successfully compiling and executing Proj0.java by issuing the single command ant run