submit
is cmsc331_smatus1
, and this project is java0
.
To submit this project: submit cmsc331_smatus1 java0 *.java
To check that your files all got submitted: submitls cmsc331_smatus1 java0
The result should look similar to
total 16 drwx------ 2 smatus1 rpc 2048 Mar 2 15:10 . drwx------ 46 smatus1 rpc 2048 Mar 2 14:56 .. -rw------- 1 smatus1 rpc 135 Mar 2 14:34 Main.java -rw------- 1 smatus1 rpc 340 Mar 2 14:34 HelloWorld.java
(You didn't submit the .class
files, did you? You should only submit the .java
files.)
General instructions for using submit
can be found at http://www.gl.umbc.edu/submit/.
You will be creating two files, Main.java
and HelloWorld.java
.
Main
must provide a main method, which instantiates an instance of HelloWorld
and calls its hello()
function.
HelloWorld
is a class with one method, hello
, which prints "Hello world!" to the command line.
This must be an instance method, not a static method.
To compile the .java
files on gl, you can issue the command javac *.java
. This should create a
.class
file for each source file.
To run the code, you can issue the command java Main
. Notice that you are giving Java the name of a class,
not the name of a file. (What happens if you try java HelloWorld
?)
submit
script. It may take a couple days before this will work
as the class has to be added to the system-wide submit.class
file.
The project is due by midnight on Monday, September 21 (i.e., the night before Tuesday morning class). It is only worth 1 point on the final grade; its real purpose is to make sure you are ready for Java Project 1.