August 28, 2002
In order to run a specific version of Java, you need to set the environment variable JAVA_HOME to the root directory of the version you'd like to run. All available versions, i.e.
are stored in the
So, if you're using csh or tcsh and wish to run Java 1.3, you would type:
setenv JAVA_HOME /depot/J2SE-1.3
at your shell prompt, and for the Bourne shell or derivatives thereof, the command would be:
export JAVA_HOME=/depot/J2SE-1.3
In addition, you need to verify that you are running the Java executables
Here is some more info about currently installed versions and about Sun's software for compiling and debugging Java applications and applets. The following executables are available in the JDK:
| Name of executable | Invocation command | Program description |
|---|---|---|
| Java Compiler | javac | Compiles programs written in the Java programming language into bytecodes. |
| Java Interpreter | java | Executes Java bytecodes. In other words, it runs programs written in the Java programming language. |
| Java Runtime Interpreter | jre | Similar to the Java Interpreter (java), but intended for end users who do not require all the development-related options available with the java tool. |
| Java AppletViewer | appletviewer | Used for testing and running applets. |
| Java Debugger | jdb | Helps you find bugs in Java programs. |
| Class File Disassembler | javap | Disassembles compiled Java files and prints out a representation of the Java bytecodes. |
| Java Documentation Generator | javadoc | Parses the declarations and documentation comments in a set of Java source files and produces a set of HTML pages describing the public and protected classes, interfaces, constructors, methods, and fields. Also produces a class hierarchy and an index of all members. |
| C Header and Stub File Generator | javah | For attaching native methods to Java code. |
| Java Archive Tool | jar | Combines many Java class files and other resources into a single jar file. |
| Digital Signing Tool | javakey | Manages entities, including their keys, certificates, and the trust associated with them. |
| Native-To-ASCII Converter | native2ascii | Converts a native encoding file to an ascii file that includes the \udddd Unicode notation. |
| Java RMI Stub Converter | rmic | Generates objects from the names of compiled Java classes that contain remote object implementations. |
| Java Remote Object Registry | rmiregistry | Creates and starts a remote object registry on the specified port of the current host. |
| Serial Version Command | serialver | Returns the serialVersionUID for one or more classes in a form suitable for copying into an evolving class. |
| AWT 1.1 Conversion Tool | updateAWT | Included with the JDK AWT documentation, rather than in the bin directory. Updates deprecated 1.0 AWT names to new 1.1 AWT names (for Sun Solaris and UNIX systems, or Windows systems with the MKS toolkit). |
| Various C libraries and include files |
To run a specific version of Netscape, you need to set the environment variable NETSCAPE_VERSION to the version number you prefer. For instance, to run version 4.75, in the csh you would type
setenv NETSCAPE_VERSION 4.75
at your shell prompt, and for the Bourne shell and its derivatives:
export NETSCAPE_VERSION=4.75
You also need to ensure that the running the executables as