среда, 6 марта 2013 г.

Install Sun JDK 1.7 on Debian


There are a couple of things that you need to be sure prior to upgrade. The most important that your app is supported by the latest Sun JDK. Once you are sure start up by downloading the latest JDK package direct from sun.
Using wget:
http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz
In the above example we downloaded the latest 64bit version of JDK for Linux.
Extract the tar file let's say in your /home directory and follow the instructions below:
cd /home/
tar xzvf jdk-7u3-linux-x64.tar.gz
update-alternatives --install /usr/bin/java java /home/jdk1.7.0_03/bin/java 1
update-alternatives --install /usr/bin/javac javac /home/jdk1.7.0_03/bin/javac 1
update-alternatives --set java /home/jdk1.7.0_03/bin/java
update-alternatives --set javac /home/jdk1.7.0_03/bin/javac
That's all, verify that is working properly and that the right binary is called:

$:/home# java -version
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)


Комментариев нет:

Отправить комментарий