Page 3 of 6 FirstFirst 12345 ... LastLast
Results 21 to 30 of 51

Thread: Installing Java on Kali-Linux

  1. #21
    Member
    Join Date
    Mar 2013
    Posts
    31
    Code:
    sudo apt-get purge openjdk*
    - I'm not sure that it's a good ideea. By doing that you'll got to handle such:

    "The following packages will be REMOVED:
    android-sdk* ant* ant-optional* apktool* armitage* bluepot* burpsuite*
    ca-certificates-java* casefile* dbpwaudit* default-jdk* default-jre*
    default-jre-headless* dex2jar* dirbuster* icedtea-6-jre-cacao*
    icedtea-6-jre-jamvm* icedtea-7-jre-cacao* icedtea-7-jre-jamvm* icedtea-netx*
    javasnoop* magictree* maltego* metasploit* openjdk-6-jdk* openjdk-6-jre*
    openjdk-6-jre-headless* openjdk-6-jre-lib* openjdk-7-jdk* openjdk-7-jre*
    openjdk-7-jre-headless* openjdk-7-jre-lib* oscanner* paros* patator*
    protos-sip* smali* vega* webscarab* xmind* zaproxy*

    The following NEW packages will be installed:
    gcj-4.7-base gcj-4.7-jre gcj-4.7-jre-headless gcj-4.7-jre-lib gcj-jre
    gcj-jre-headless libgcj-common libgcj13 libgcj13-awt
    0 upgraded, 9 newly installed, 41 to remove and 0 not upgraded.
    Need to get 24.5 MB of archives.
    After this operation, 996 MB disk space will be freed.
    "
    Think twice before say YES.

  2. #22
    Member
    Join Date
    Mar 2013
    Posts
    31
    Quote Originally Posted by r3ng4f View Post
    Install the package icedtea-7-plugin command like:

    # apt-get install icedtea-7-plugin

    Restart your browser and test.

    I hope I helped.
    Thank you mate. One of the most simple and safest solution. 100% worked out.

  3. #23
    Junior Member
    Join Date
    Mar 2013
    Posts
    27
    It seems like Java breaks for me every time there's a new update or something available. I'm not sure what the deal is. One minute it works, the next minute it doesn't. I always find myself having to come back to this thread, downloading a newer version of Java, and then executing those commands again.

    Is there any way I could get some assistance diagnosing this? Pretty annoying to have it stop working all of a sudden.

  4. #24
    Junior Member
    Join Date
    Jul 2013
    Location
    Portugal
    Posts
    1
    UPDATED THIS POST FOR versions x86
    java version (jdk-7u25-linux-i586)


    1. Download the latest Java SE SDK version.

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

    The version at the time i did the post jdk-7u25-linux-i586.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_25/bin/java 1
    update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_25/bin/javac 1
    update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.7.0_25/jre/lib/i386/libnpjp2.so 1
    update-alternatives --set java /opt/jdk1.7.0_25/bin/java
    update-alternatives --set javac /opt/jdk1.7.0_25/bin/javac
    update-alternatives --set mozilla-javaplugin.so /opt/jdk1.7.0_25/jre/lib/i386/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?”

    Keep Up

  5. #25
    Junior Member
    Join Date
    Aug 2013
    Posts
    2
    I have a problem in the last step , your help plzzz !!!
    root@Kali-PC:/opt/jdk1.7.0_25# update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_25/bin/java 1
    root@Kali-PC:/opt/jdk1.7.0_25# update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_25/bin/javac 1
    root@Kali-PC:/opt/jdk1.7.0_25# update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.7.0_25//jre/lib//i386/libnpjp2.so 1
    update-alternatives: using /opt/jdk1.7.0_25//jre/lib//i386/libnpjp2.so to provide /usr/lib/mozilla/plugins/libjavaplugin.so (mozilla-javaplugin.so) in auto mode
    root@Kali-PC:/opt/jdk1.7.0_25# update-alternatives --set java /opt/jdk1.7.0_25/bin/java
    update-alternatives: using /opt/jdk1.7.0_25/bin/java to provide /usr/bin/java (java) in manual mode
    root@Kali-PC:/opt/jdk1.7.0_25# update-alternatives --set javac /opt/jdk1.7.0_25/bin/javac
    update-alternatives: using /opt/jdk1.7.0_25/bin/javac to provide /usr/bin/javac (javac) in manual mode
    root@Kali-PC:/opt/jdk1.7.0_25# update-alternatives --set mozilla-javaplugin.so /opt/jdk1.7.0_25//jre/lib/i386/libnpjp2.so
    update-alternatives: error: alternative /opt/jdk1.7.0_25//jre/lib/i386/libnpjp2.so for mozilla-javaplugin.so not registered; not setting

  6. #26
    Junior Member
    Join Date
    Jul 2013
    Posts
    8
    hurrah its done i have java installed on my kali os

  7. #27
    Junior Member
    Join Date
    Aug 2013
    Posts
    1
    Worked perfectly thanks.

  8. #28
    Junior Member
    Join Date
    Sep 2013
    Posts
    1
    When I type
    update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.7.0_25/jre/lib/amd64/libnpjp2.so 1
    it gives me
    update-alternatives: erreur: le chemin alternatif /opt/jdk1.7.0_25/jre/lib/amd64/libnpjp2.so n'existe pas
    which means that that pathway doen't exist, can someone help me plz? :/

  9. #29
    Junior Member
    Join Date
    Sep 2013
    Posts
    1
    Thanks a lot, works perfectly with jdk1.7.0_40

  10. #30
    Junior Member
    Join Date
    Sep 2013
    Posts
    16
    I tried this method and succeeded

    after the download from the link
    http://www.java.com/en/download/index.jsp
    #ls
    #tar zxvf jre-7u40-linux-x64.tar.gz
    #killall -9 /opt/firefox/firefox-bin
    #mkdir /opt/java
    #update-alternatives --install /usr/bin/java java /opt/java/jre1.7.0_40/bin/java 1
    #update-alternatives --set java /opt/java/jre1.7.0_40/bin/java
    #ln -sf /opt/java/jre1.7.0_40/lib/amd64/libnpjp2.so /usr/lib/mozilla/plugins/
    #export JAVA_HOME="/opt/java/jre1.7.0_40/bin/java"
    #firefox http://java.com/en/download/testjava.jsp

    for more information
    http://www.backtrack-linux.org/wiki/...p/Java_Install

Posting Permissions

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