To use Sun's JDK 1.1, you must be on a Sun machine in the Andrew domain. This includes the Wean Hall rooms 5201, 5202, and 5204. JDK consists of a number of utilities in the directory /usr/local/bin. You should only need to use two of them:
main()
method in a .class file.test.java
,
simply type:
javac test.java java test
We will be using JDK version 1.1 in this class. The default version of JDK on the Sun machines is 1.0, as you can see by typing:
java -versionJava should respond with:
java version "1.0"To change this to version 1.1, type (and add to your
.login
file):
setenv JAVA_1_1 trueNow, in response to
java -version
, you should get:
java version "1.1_Final"