Jul 17, 2012

0 To install JDK on Ubuntu





1.Go to Oracle JDK download page. And download the latest linux jdk in .tar.gz format.
2. Type the below code in terminal and hit enter to extract in (xxxxx- folder you need).

tar -xvf ~/ xxxxx /jdk-7u4-linux-i586.tar.gz

3. Type below command in terminal to create a new folder.

sudo mkdir -p /usr/lib/jvm/jdk1.7.0

4. Now type below command to move files.

sudo mv jdk1.7.0_04/* /usr/lib/jvm/jdk1.7.0/
!!! change (jdk1.7.0_04) to your jdk version!!!

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

8. check the installed version type
java -version

0 comments :

Post a Comment

Comment: