If you need help getting tio working on your Windows95/98 machine
look here.
Compiling and running Java programs
In the lab we
will be using the standard/free JDK from Sun Microsystems
running under
Windows/NT. You will use
any editor and then run javac to compile your program and java to execute it
as described below.
- Start a command line shell which you do by clicking the
Start icon in the lower left corner and then clicking Utilities and then
clicking "DOS Command Prompt".
- I suggest you then do "cd usertemp" to change to the temporary work
area.
- To create your Java program, you can use any editor. A reasonable choice
is SuperEdit which you will find under the Start/Programs.
- After typing in your file, save it, either to a floppy or to c:\usertemp.
- In the "Command Prompt" window, first cd to the directory containing
your Java source file, e.g. MyClass.java. You compile a java program with
"javac MyClass.java".
- In the "Command Prompt" window, you run a compiled Java program with
"java MyClass" (no extension) where MyClass is the name of a class that
contains a method main().
- When you are done, be sure and save your work either on a floppy or
use ftp to transfer the Java source files to your Unix account, as described
below.
- After you are SURE that you have copied your files to a floppy
or successfully ftp'd them to your unix account, you need to remove them from
c:\usertemp (assuming that is where you created the file). You can do this with
"rem *.java" from the command prompt. Be certain you have copied them
before you remove them. This remove does not save a copy in the trash can,
it really removes the file. It is your responsibility to not leave any
copies of your files around as a temptation to other students that may
use the computer after you.
Running Java2 (JDK1.2.2) on CATS Unix machines
You can also compile and run your programs on the CATS Unix machines,
teach.ic and learn.ic.
FTP and Submit
You will need to ftp your files to your unix account in order to submit
your completed programs. In addition, you may wish to use ftp and unix to
save your work instead of using a floppy.
The Windows FTP utility can be found under the Start popup menu (lower left
corner), then Internet Tools, then Unix File Transfer. This program is
very easy to use. Fill in the UserID (your unix login name) and Password fields.
Once connected, you can select a file on the left window (Windows), select a
directory in the right window, then click the right pointing arrow in the
middle to transfer the file. You can move files or folders in either direction.
Once you have copied your files to your unix account, login to your unix
account (Start/Internet Tools/Telnet), and run
submit.
[Homepage] |
[General Lab Info] |
[TA's & Tutors] |
[FAQ's] |
[Supplements] |
[Homework] |
[Excellent Programs] |
[Exams]
Ewerton L. Madruga
Modified by Charlie McDowell on January 3, 2000.