The Java Programming and Runtime Environment
In order to use Java (for development or just for execution) one needs:
- A bytecode interpreter for the local platform.
This program is usually called java.
Some Java-enabled browsers, on some platforms, may provide direct access to
the bytecode interpreter of the browser.
The java may also invoke a "just in time" (JIT) compiler
to translate the bytecodes to machine code before executing it.
- A set of standard classes, delivered as a zipfile,
classes.zip, or possibly as a jar-archive,
rt.jar. In the development kit this file also
contains the java compiler, called javac.
A "CLASSPATH" environment variable or a "-classpath" command-line
argument is used to indicate where the
classes are to be found.
- For applications with graphical user-interfaces one also needs an
appletviewer.
For testing applets a Java-enabled browser can be used instead.
The original appletviewer offers more flexibility in selecting the
desired security environment.
Other useful tools are:
- A java disassembler, called javap.
- A C header file generator, called javah.
- A document generator, called javadoc.
- A debugger, called jdb.
It works best when programs are compiled with the non-optimizing compiler
javac_g.
Note: For the development assignments in this course we assume that
a recent version of the JDK is used, for instance the JDK version 1.3
from Javasoft.
On Unix systems for which Netscape Navigator is available
the command netscape -java can be used
as a bytecode interpreter.