Java Programming Spring 2003 Homework #1

Installing and Testing Java SDK

Due Date: 1/27/03
Electronic Submission Only!

Assignment

This assignment is simply to install Java SDK 1.4.1 and get things working on your computer. If you have access to a computer with Java already intalled, feel free to use that computer (we don't care if you know how to install Java, just that you have a usable Java development environment available to you). Once you have Java installed, you need to make some simple additions to the program shown below, compile and run the program. You will need to submit your source code (the file Hw1.java that you have modified) and the output of the program when you run it on your machine.

Installing Java:



  Starting Code for HW1
/**
 * Title: Hw1
 * Description: Homework #1 Class Definition
 * @author joestudent@rpi.edu
 * @version 1.0
 */

public class Hw1 {

    /**
     * The main() simply calls ShowInfo.
     */
    public static void main(String[] args) {
        ShowInfo();
    }

    /**
     * ShowInfo does all the work by calling System.getProperty
     */
    public static void ShowInfo() {
        System.out.println("Version: " + System.getProperty("java.version"));

        /* In addition to the above statement, this program should
           print out the following:
           operating system name
           virtual machine name
           user name
           user's current working directory

	   HINT: Look at the documentation for System.getProperty()
	*/
    }
}




How to submit

Submission of your homework is via email, the general idea is to send an email message with your files as attachments. There is an automated email submission system that will respond to your submission right away, so you will have a record that we got your file. For HW1 you should submit your Hw1.java file and the results file produced when you run the Hw1 program.

All projects must be submitted via email to javaprog-submit@cs.rpi.edu. The subject line of the submission message should contain a single number '1' indicating the HW number. The body of your message should include your full name (and anything else you want to tell us). Make sure your email message includes your full name, we can't record your grade unless we know your name (and the email address joe222@yahoo.com doesn't mean anything to us!).

Don't send compiled code (class files)!

You can expect a return email indicating receipt of your project submission immediately. This receipt will include a list of all the files that were successfully extracted by the submission script - please look over the receipt carefully to make sure your submission worked.

Multiple Submissions: You can resubmit up to 10 times for each project, we will always grade the last submission received unless you tell us otherwise.