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