CS 3291 (Java with Internet Applications):
Java Tips
General instructions for using the JDK (Java Development Kit)
- Use any text editor to enter the source code for your program.
Save the Java source as
*.java. If you are creating an applet, you will
also need HTML source, saved as *.html.
Note that the name of the .java file
must be the same as the name of the public class it
contains
(e.g., the name of the file containing public class
hello must be hello.java).
- Use javac to compile programs
(e.g., javac hello.java).
- Use java to execute a stand-alone program
(e.g., java hello).
- Use appletviewer to execute an applet
(e.g., appletviewer hello.html), or use
your favorite browser.
- (The commands javac, java, and
appletviewer are installed in
/usr/local/java/bin/. You may need to
add this to your search path.)
System-specific instructions
The above instructions should work on the department Linux machines;
the version of Java installed is not the most current but appears to
be usable.
Additional information will be provided as it becomes available.
Obtaining Java for your own system
One of the following links to Sun's Web site
should lead you to a version of Java for your system.
Or you may prefer to try Microsoft; see
their
Java home page.