Java » History » Version 1
Anonymous, 09/28/2007 02:41 PM
1 | 1 | Anonymous | = Update Java = |
---|---|---|---|
2 | 1 | Anonymous | |
3 | 1 | Anonymous | * Download the latest version of the ''Java Development Kit'' (JDK) as a self-extracting binary file from [http://java.sun.com/javase/downloads/]. |
4 | 1 | Anonymous | |
5 | 1 | Anonymous | * Make it executable and install it into ''/usr/java/jdk-XXX''. |
6 | 1 | Anonymous | {{{ |
7 | 1 | Anonymous | # chmod u+x jdk-XXX.bin |
8 | 1 | Anonymous | # ./jdk-XXX.bin |
9 | 1 | Anonymous | }}} |
10 | 1 | Anonymous | |
11 | 1 | Anonymous | * Move it to the the same folder with all other Java versions: |
12 | 1 | Anonymous | {{{ |
13 | 1 | Anonymous | # mv /usr/java/jdk-XXX /usr/lib/jvm |
14 | 1 | Anonymous | }}} |
15 | 1 | Anonymous | |
16 | 1 | Anonymous | * Install the new version within the ''alternatives'' system: |
17 | 1 | Anonymous | {{{ |
18 | 1 | Anonymous | # update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-XXX/jre/bin/java 300 |
19 | 1 | Anonymous | }}} |
20 | 1 | Anonymous | |
21 | 1 | Anonymous | * Select the new version as the default using: |
22 | 1 | Anonymous | {{{ |
23 | 1 | Anonymous | # alternatives --config java |
24 | 1 | Anonymous | }}} |
25 | 1 | Anonymous | |
26 | 1 | Anonymous | * Check the version of the default java installation: |
27 | 1 | Anonymous | {{{ |
28 | 1 | Anonymous | # java -version |
29 | 1 | Anonymous | }}} |