Setting your java version

Since there is a need to support several different versions of java, we have come up with a way to simplify how to specify which version of java you need/want.

The default java version on remus/romulus is currently set to java 1.2.2. If this version is sufficient for your needs, you won't need to do anything to your environment. This also will not affect you if you have set your path to include a specific version of java. (As long as your java path settings appear before /usr/local/bin in your PATH environmental variable ).

To see what your current java version settings are, type /usr/local/bin/java-version at the prompt.

We have two methods for changing your version of java to something that suits your needs.

  1. The first method is setting a JAVAVERSION environmental variable to new , current, or old.
    • Under csh or tcsh:
      • add setenv JAVAVERSION version to your .cshrc file (replace version with new, current or old)
      • or type setenv JAVAVERSION version at the prompt
        For example: setenv JAVAVERSION current would allow you to run java 1.2.2

    • Under ksh:
      • add the following two lines to your .profile
        JAVAVERSION=version

      • export JAVAVERSION
        (replace version with new, current or old)
      • or type export JAVAVERSION=version at the prompt
        For example: export JAVAVERSION=current would allow you to run java 1.2.2

    • Under bash:  (see directions for ksh)
    The current settings on remus/romulus are:
    • old is java 1.1.7
    • current is java 1.2.2
    • new is java 1.3.

  2. The second method is to replace "version" with the specific version number you need.

    For example:  The java version you want is java 1.1.3.  You can set  JAVAVERSION to 1.1.3  instead of setting it to new, old, or current as shown above.

When you run java (or javac, jdb, appletviewer, etc.), you will be running the version specified by the JAVAVERSION variable.  If this variable is not set you will be running the default version of java.; (currently java 1.2.2)