Project DevelopmentProjects in this course will be developed using the Eclipse Integrated Development Environment (IDE). 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" (NOT "Eclipse IDE for Java EE Developers") may be downloaded free of charge from www.eclipse.org. Note that Eclipse requires that you have installed the Java Runtime Environment (JRE) on your PC. The latest version of Java is Java 6. However, the Java 5 JRE is recommended by Eclipse and can be downloaded from Oracle (Java Runtime Environment (JRE) 5.0 Update 22). Although not officially recommended by Eclipse, Java 6 seems to cause no problems when using Eclipse to develop our projects. Java 6 is the version currently loaded on GL and will be used to compile and test your projects.
We will spend some time in one of the labs gettting acquainted with Eclipse, but you would do well to spend time using Eclipse on your own.
Project PoliciesEach project description will designate the project as OPEN or CLOSED as defined below.
This DOES NOT mean
You MAY NOT
Program CompilationThe 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 project graders will use either linux1 or linux2 to compile and test your program. Therefore, ALL PROJECTS must compile and execute on linux1 and linux2.
If you have been developing your code on some other machine (most likely a personal laptop), you must first get your files onto the campus network file system. This will then make them directly accessible from almost any of the university's machines (the lab machiens, the GL servers, etc.) You will also need some way to work on one of the GL servers; the easiest way is to go to one of the labs; however, we also tell you how to do this remotely, below.
The process is very different, depending on whether you are using a Unix-based machine (this includes Linux boxes AND Macs!), or a Windows system. We will discuss Macs and Linux first, since they already have the necessary applications built-in.
On Macs and Linux boxes, first open up a terminal window (you can find it in the Utilities folder on a Mac, and you Linux hackers would be insulted if I told you how to do it).
To open up a virtual terminal session to the GL systems so that you can do things like manage your files and run Java there, just type:
ssh gl.umbc.eduAfter entering your password when prompted, you will be logged in to the GL system. You are now set to run "submit" or "javac" or anything else you want.
To transfer files, you will use the "scp" program. You should run this from a fresh terminal window: you should NOT do this from a terminal window that is "ssh"ed into the GL machine.
Bring up a terminal window, "cd" into the local directory with the files you want to transfer, then type "scp myFile1 myFile2 myFile3 ... gl.umbc.edu:202files"; this will copy the files to the "202files" directory you created in the previous step.
If you are using a Windows system, you will need to download a a virtual terminal program like TeraTerm (downloadable here), as well as a "secure FTP/SCP" client program. (downloadable here). Once they are installed, you can first launch TeraTerm and request a connection to "gl.umbc.edu"; this will give you a virtual terminal interface in which you can run programs on the GL machine, including "submit" and "javac". You can also launch WinSCP, which will give you a drag-and-drop interface to transfer files to any remote system; you will be connecting to gl.umbc.edu.
All students must use the java compiler and JVM found in the directory
To check which compiler and JVM you are using, run the command which javac.
If the result is /usr/local/bin/javac then you're good to go.
If the result is /usr/bin/javac then follow the steps below.
alias javac /usr/local/bin/javac alias java /usr/local/bin/java
If you develop your projects on your own PC, be sure that you are using javac version 1.6.x, also known as Java6, also known as JavaSE6.
The example below illustrates how to compile and test your code on GL. Let's suppose that you have completed project 1, that your code is in Project1.java and that you have included the statement package proj1; at the top of Project1.java as directed in the project description. Once you have completed development and have moved Project1.java to your GL directory, compile it using the command below (notice the "dot").
javac -d . *.javaThis command will create a subdirectory named proj1 (the name of the package) and place the file Project1.class in that subdirectory. (Note that the above command should also be used in the case where you have multiple java files to compile.)
If the instructor provided any .jar files for the project, unless you are an expert with JREs and classpaths, the easiest process is to unpack the class files into your tree. To do this, from the same directory as above, just type:
jar xf proj2UtilLib.jarwhere you would replace "proj2UtilLib.jar" with whatever jar file you are using.
To execute your code, use the command
java proj1.Project1from the directory that contains Project1.java.
NOTE, WARNING, ALERT: If the project is text-based, you can compile and execute your program from your PC at home or from any OIT lab. HOWEVER.... if the project is GUI-based, you MUST run your program from a Linux machine in an OIT lab in order to test it on GL. You WILL NOT be able to execute a GUI-based project from your PC at home.
Project SubmissionAll projects will be submitted as .java files. Java requires that each 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.