Compiling Java programs

Sun's JDK 1.0.2

To use JavaSoft's Java Development Kit on our unix machines (SunOS or Solaris), make sure to add /usr/local/java/bin to the front of your path.
    set path=(/usr/local/java/bin $path)
You can then use any of the JDK tools (appletviewer, javap, javac, javadoc, jdb).

(The SunOS port was done locally, please report any problems or bugs to unix@csi.uottawa.ca.)

Sun's JDK 1.1

Make sure you add /usr/local/java/jdk1.1/bin to the front of your path.
    set path=(/usr/local/java/jdk1.1/bin $path)

(Again, the SunOS port was done locally, please report any problems or bugs to unix@csi.uottawa.ca.)

Sun's JDK1.1.3 (Solaris 2.x only)

Make sure you add /usr/local/java/jdk1.1.3/bin to the front of your path.
    set path=(/usr/local/java/jdk1.1.3/bin $path)

guavac

guavac is a java compiler written in C++ and will compile your .java files to .class files quickly.

kaffe

kaffe is a JIT (Just In Time) Java Virtual Machine and will run the JDK java compiler faster than the JavaSoft Java interpreter.

If you don't set your path for the Sun JDKs you will be using the kaffe engine if you type javac appletviewer or javadoc. The graphical toolkit used by kaffe is BISS AWT which has similar functionality to the JDK Motif based toolkit but different "look and feel."

Running Java applications

You compile your .java files with 'javac' and run them with 'java'. For example:

    javac HelloWorld.java 
    java HelloWorld
To run your application using the kaffe engine:
    kaffe HelloWorld

Java information

Local copies of the
Last update: 1997/06/18