Showing posts with label JDK installation in Debian. Show all posts
Showing posts with label JDK installation in Debian. Show all posts

Monday, July 23, 2012

Installing the JDK in debian

1) Download and Uncompressed the JDK file


2) move the JDK directory to /usr/lib/jvm

Example
sudo mv ./jdk1.7.0_02  /usr/lib/jvm/jdk1.7.0

3) run

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1

4) Run

sudo update-alternatives --config java

Press enter to keep the current choice[*], or type selection number: 3


5) confirm the success of new installation 

java -version

6) Repeat the step 4 for:

sudo update-alternatives --config javac
sudo update-alternatives --config javaws



www.klairvoyant.in