How to Run Java at Iowa State

This document gives basic ways to run the programming language Java at Iowa State University in the Department of Computer Science. It also describes how to get Java for other computers.

Contents:

Windows 95

Perhaps the best way to run Java is to put it on your own PC. If you have Windows 95, then install the free Java Development Kit (JDK), or a commercial version of Java. The latest JDK version is avaliable for download from the JavaSoft main web page. You can also find documentation for JDK 1.1 there.

Department HP-UX Machines

The latest Java Development Kit (JDK) for HP-UX is available from HP's Java page.

Our machines have a recent version of the JDK installed; the exact version varies with the operating system version of HP-UX.

The interpreters and tools are found in /opt/java/bin, so you must have this directory in your shell's PATH. In this directory, there are (at least, the following tools).

The basic cycle for using the interpreter on an application (a program) is as follows.

    % emacs MyProgram.java
    % javac MyProgram.java
    % java MyProgram
In this example, it is assumed that emacs is your editor and that the file MyProgram.java contains a class named MyProgram with a public static void method named main.

If you instead write an applet, you'll have to use the appletviewer or a java-enabled browser. The basic cycle is as follows.

    % emacs MyApplet.java
    % javac MyApplet.java
    % emacs MyApplet.html
    % appletviewer MyApplet.html
This example again assumes that emacs is your editor. It also assumes that the file MyApplet.java contains a public class named MyApplet with a public void method named paint. See a book on Java for details on the HTML file MyApplet.html.

How to Find More

Here are some interesting sources of information on the net.
[Back to the Fun with Java Seminar homepage]
Last update $Date: 1997/06/10 14:16:35 $
Gary T. Leavens
229 Atanasoff Hall
Department of Computer Science, Iowa State University
Ames, Iowa 50011-1040 USA