Page 1 of 6 123 ... LastLast
Results 1 to 10 of 51

Thread: Installing Java on Kali-Linux

  1. #1
    Administrator purehate's Avatar
    Join Date
    Mar 2013
    Posts
    1

    Installing Java on Kali-Linux

    1. Download the latest Java SE SDK version.

    http://www.oracle.com/technetwork/ja...ads/index.html

    At the time of writing the filename and version was jdk-7u17-linux-x64.tar.gz

    2. Untar the Archive
    tar -xzvf /root/jdk-7u17-linux-x64.tar.gz
    mv jdk1.7.0_17 /opt
    cd /opt/jdk1.7.0_17

    3.This step registers the downloaded version of Java as an alternative, and switches it to be used as the default:

    update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_17/bin/java 1
    update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_17/bin/javac 1
    update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.7.0_17/jre/lib/amd64/libnpjp2.so 1
    update-alternatives --set java /opt/jdk1.7.0_17/bin/java
    update-alternatives --set javac /opt/jdk1.7.0_17/bin/javac
    update-alternatives --set mozilla-javaplugin.so /opt/jdk1.7.0_17/jre/lib/amd64/libnpjp2.so

    4. Test

    To check the version of Java you are now running

    java -version

    To check the browser plugin browse to http://www.java.com/ and click “Do I have Java?”

  2. #2
    Junior Member
    Join Date
    Mar 2013
    Posts
    1
    i think step 3 dosen't work since when i try java -version i get
    Code:
    bash: /usr/bin/java: cannot execute binary file

  3. #3
    Junior Member
    Join Date
    Mar 2013
    Posts
    1
    Quote Originally Posted by Dark_4ngel View Post
    i think step 3 dosen't work since when i try java -version i get
    Code:
    bash: /usr/bin/java: cannot execute binary file

    everything works, just download&install 32 bit version instead of 64 bit.

    And in step 3 change /amd64/ to /i386/

  4. #4
    Super Moderator
    Join Date
    Mar 2013
    Posts
    65
    In the steps above it is using 64bit software, Dark_4ngel, are you running a 64Bit Kali install or 32?

    Not sure but that may be the issue.

  5. #5
    Junior Member
    Join Date
    Mar 2013
    Posts
    2
    Confirmed working.
    root@localhost:~# tar -xzvf jdk-7u17-linux-x64.tar.gz
    jdk1.7.0_17/
    jdk1.7.0_17/include/
    [..]
    root@localhost:~# mv jdk1.7.0_17 /opt
    root@localhost:~# cd /opt/jdk1.7.0_17/
    root@localhost:/opt/jdk1.7.0_17#
    root@localhost:/opt/jdk1.7.0_17# update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_17/bin/java 1
    root@localhost:/opt/jdk1.7.0_17# update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_17/bin/javac 1
    root@localhost:/opt/jdk1.7.0_17# update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.7.0_17/jre/lib/amd64/libnpjp2.so 1
    update-alternatives: /opt/jdk1.7.0_17/jre/lib/amd64/libnpjp2.so wird verwendet, um /usr/lib/mozilla/plugins/libjavaplugin.so (mozilla-javaplugin.so) im Auto-Modus bereitzustellen
    root@localhost:/opt/jdk1.7.0_17# update-alternatives --set java /opt/jdk1.7.0_17/bin/java
    update-alternatives: /opt/jdk1.7.0_17/bin/java wird verwendet, um /usr/bin/java (java) im manueller Modus bereitzustellen
    root@localhost:/opt/jdk1.7.0_17# update-alternatives --set javac /opt/jdk1.7.0_17/bin/javac
    update-alternatives: /opt/jdk1.7.0_17/bin/javac wird verwendet, um /usr/bin/javac (javac) im manueller Modus bereitzustellen
    root@localhost:/opt/jdk1.7.0_17# update-alternatives --set mozilla-javaplugin.so /opt/jdk1.7.0_17/jre/lib/amd64/libnpjp2.so
    root@localhost:/opt/jdk1.7.0_17# java -version
    java version "1.7.0_17"
    Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
    Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

  6. #6
    Junior Member
    Join Date
    Mar 2013
    Posts
    2
    everything's working bro...

  7. #7
    Member
    Join Date
    Mar 2013
    Location
    localhost
    Posts
    40
    Nice thank you.

  8. #8
    Junior Member
    Join Date
    Mar 2013
    Location
    Malaysia
    Posts
    1
    it's working....thanks....
    If you can dream big,than you can courage yourself to work hard till you achieve it

  9. #9
    Junior Member
    Join Date
    Mar 2013
    Location
    Bangalore
    Posts
    3
    Thank you for your useful information.

  10. #10
    Junior Member
    Join Date
    Apr 2013
    Posts
    1
    Thank you...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •