Minggu, 22 April 2012

Install JDK 7 on Backtrack 5

To the point please download jdk 7 (new version) from Oracle official site. In here i used jdk 7 update 3. Because i used Backtrack 32 bit. so i downloaded : jdk-7u3-linux-i586.tar.gz. 

 after you finish downloading, extract that jdk with command :

#tar xvfz jdk-7u3-linux-i586.tar.gz

after fisnish extrarc process, there will be a folder named : jdk1.7.0_03. Move the folder jdk1.7.0_03 to folder /user/lib/jvm with command :

#mv jdk1.7.0_03 /usr/lib/jvm

Following command to show anywhere JDK has been installed on our linux. For now have not seen that jdk1.7.0_03 is installed correctly

#update-alternatives --config java
There is only one alternative in link group java: /usr/lib/jvm/java-6-openjdk/jre/bin/java

That if you have just one java or jdk if you have more 2 java or jdk on your computer you will see

Selection    Path                                                           Priority   Status
————————————————————
* 0          /usr/lib/jvm/java-6-openjdk/jre/bin/java        1061      auto mode
1            /usr/bin/gij-4.4                                                   1044      manual mode
2            /usr/lib/jvm/java-6-openjdk/jre/bin/java        1061      manual mode
3            /usr/lib/jvm/java-6-sun-1.6.0.26/jre/bin/java    2         manual mode
4            /usr/lib/jvm/java-6-sun/jre/bin/java                 63        manual mode
Press enter to keep the current choice[*], or type selection number:

push enter, continue command :

#update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_03/jre/bin/java 2

then continue to configuration :

#update-alternatives --config java

you will see again :
Selection    Path                                                        Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      auto mode
  1            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      manual mode
  2            /usr/lib/jvm/jdk1.7.0_03/jre/bin/java           2         manual mode

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


select jdk1.7.0_03 in here number 2 so type the number 2 and push the enter

then check again jdk or java version with command :

#java -version 

you will see :

java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) Server VM (build 22.1-b02, mixed mode)


jreeeng, now you has been successful installed JDK new version
Good luck :-)

3 komentar:

  1. Thank's for you tutor,now i can update my java to:
    java version "1.7.0_04"
    Java(TM) SE Runtime Environment (build 1.7.0_04-b20)
    Java HotSpot(TM) Server VM (build 23.0-b21, mixed mode)

    BalasHapus
  2. Deja Vu!

    you are the man!

    BalasHapus
  3. thanks! can proceed to tizen sdk install!

    BalasHapus