When your program is running correctly, you'll need to use ftp
software to move it to csc.oakton.edu and then use telnet
software to submit it. These notes are from a MS Windows XP machine
running SDK 1.4.
You will need a copy of both the Java Runtime Environment
and the Sun Development Kit. These downloads are rather large and
if your Internet connection is slow, you can consider downloading them
onto a machine with a fast connection that can cut a CD ROM and then install
off of that disk.
The standard edition is probably adequate. The Java Runtime Environment is a self extracting executable that will install into the correct default directory on its own and needs no configuration. The Sun Development Kit, likewise is a self extracting executable that will install into the correct directory, but requires one additional step in configuration. The directory will be based upon the release number and the version number. For example, if you are downloading the installer for update 1.4.1_01, the directory would be C:\j2sdk-1.4.1_01.
The last step is to add the \bin subdirectory of SDK installation to your PATH (the procedure for doing this varies based on the operating system version you are using). In old MS operating systems, you can simply edit your autoexec.bat file with an ASCII editor. In MS XP, I had to find the Control Panel and then the System icon.
In that form, click on the Advanced and then the Environment
Variable buttons.
Click on the PATH variable and then the Edit button
and insert the correct path into the PATH list. Naming
conventions are C:\J2SDK<release number>_<version number>\BIN
, such as C:\J2SDK1.4.1_01\bin; Click on all of the OK
buttons until you are again at the Control Panel.
If you will be needing supporting files (as most CSC course do), you
should place them into a directory, compile them and then add that directory
to your CLASSPATH environment variable.
From the MS Start icon, move to the Programs and then
the Accessories and then to Notepad (other ASCII editors
can be used).
Type your source file into the editor.
Save the program into a file, let's call it hello.java
and open a DOS window. This can by done by typing cmd
into the window of the Run command. You may need to use the
cd
command to make sure that the DOS window is in the same directory as the
source file.
Compile the program by typing the the command javac hello.java
into the DOS window Correct any syntax errors before proceeding.
Execute the program by typing the command java hello
into the DOS window.