As long as your projects compile and run on the GL servers (linux1 or linux2) you are free to use whatever development tools you want. However, we recommend that you use the Eclipse Integrated Development Environment (IDE), which is widely used in industry. Eclipse is designed to assist you when writing Java applications. Eclipse is available on the PCs located in the OIT labs. If you prefer to work on your own PC, the ‘Eclipse IDE for Java Developers” may be downloaded free of charge from www.eclipse.org. The current version of Eclipse is called Juno. Note that Eclipse requires that you have installed the Java Runtime Environment (JRE) or Java Development Kit (JDK) on your PC. The current version of Java is Java 7 and can be downloaded from Oracle.
The UMBC UNIX system runs two different versions of UNIX. The systems known as linuxl.gl.umbc.edu and linux2.gl.umbc.edu run the version of UNIX called Linux. The system known as solaris.gl.umbc.edu runs the version of UNIX called Solaris.
The TAs will use either linux1 or linux2 to compile and test your program. Therefore, ALL PROJECTS must compile and execute on linux1 and linux2. In theory, the Java slogan of “write once, run anywhere” will apply, but where project grades are involved the more appropriate slogan is “better safe than sorry”.
Note that linux.gl.umbc.edu are running Java 6. If using a newer version of Java at home, you'll want to take extra care to avoid using any Java 7 specific features and ensure your project compiles/runs on GL.
The grading scripts use ant (see below) to compile and execute your projects. Ant relies on the environment variable JAVA_HOME to determine which java compiler and runtime environment to use. Add the following lines to your .cshrc file (for csh users) to specify the same Java environment used by the grading scripts.
setenv JAVA_HOME /usr/local/jdk1.6.0 set path = ($JAVA_HOME/bin $PATH)
If you develop your projects on your own PC, be sure that you are using at least Java 5 — Java 6 or Java 7 are recommended.
Ant is a tool for compiling
large Java-based projects. The scripts that compile and execute
your projects for grading will use Ant, so you must be sure that
your code can be compiled using Ant as well. The version of Ant in
/usr/local/bin will be used by the scripts.
When you check out your project directory using CVS, it will contain a file named build.xml. This file tells Ant how to, among other things, compile your code. This file WILL require modification for all students and all projects. With build.xml in the root directory of your project tree, you can compile all of your source files using either of the following command lines:
ant ant compile
To remove class files and backup files (those ending in ~), use this command line:
To execute your program, use this command line:
ant runIf your program uses command line arguments, use the -Dargs switch with the command line arguments in quotes separated by whitespace. For example
ant -Dargs="arg1 arg2 arg3" run
To create javadoc for your project, use this command line:
A directory named doc will be created in the directory containing build.xml, and you can browse your javadoc by opening index.html in the doc directory.
Standards and Style
All projects should adhere to the Java coding standards found in the course coding standards document unless otherwise directed. Each project will be evaluated on these guidelines. Failure to follow these criteria will result in a lower project score.
Project Submission and Policies
Projects will be submitted for grading using the open source CVS version control system, which is widely used
in industry. All projects will be submitted as .java files. Java
requires that each public class be found in its own .java file. The
file which contains
main( ) must be named for the
project. For example, for Project 1,
main( ) would be
found in Proj1.java.
CVS utility scripts are provided so that you can verify that your project was submitted correctly and will execute properly when graded.
- Read the course policy on project grading and regrades
- Read the course policy on late submissions
- Read the course and univesity policy on academic conduct