/bin/ls -d /usr/local/java* | sed 's;.*java;;'
To manage so many versions of Java, we've written a script. To use this script, you must put /usr/local/bin in your path before /usr/bin. This will ensure that, as far as possible, you will be running the same version of Java on all our Suns. You can determine what version of Java you're running with the command:
java -version
If you need to run a specific version of Java, you can set the environment variable, JAVAVERSION to the version desired. Eg, for version 1.4, you could put
setenv JAVAVERSION 1.4in your .login. Note: trying to run java after setting JAVAVERSION to a version which does not exist on the current machine will produce an error.
There are two more values you can set JAVAVERSION to: old and new. old will get you the previous default version of Java. You might use this to complete work you were doing at the time the definitions of the current as well as the old and new versions were changed. new will get you latest version of Java widely available on our systems.
In keeping with our policy to maintain a stable computing environment, we will try to change the definitions of Java versions only between semesters.