Hello & Welcome to Team Nocturnal Forums
You can also find us on Follow us on Facebook Follow us on Twitter Watch us on YouTube
Sign Up

Results 1 to 5 of 5

Thread: [Video] How to install java JDK in Ubuntu 12.04, 11.10 LTS April 5, 2012

  Bookmark and Share   
  1. #1
    Social Media Director XsMagical's Avatar
    Join Date
    Aug 2011
    Location
    Moms Basement
    Posts
    2,143
    Thanks
    173
    Thanked 829 Times in 486 Posts

    [Video] How to install java JDK in Ubuntu 12.04, 11.10 LTS April 5, 2012



    I will post a quick guide and edit it as i tune it. but this will install java Oracle in ubuntu for use with Adb and any other java plugins

    Download the latest Oracle JDK 7 from HERE (you must click "accept license" and then download the .tar.gz package for your computer architecture - jdk-7-linux-i586.tar.gz or jdk-7-linux-x64.tar.gz; these filenames are just examples, they will change on future releases). You can use these instructions for older JDK versions too, but make sure you use the appropriate folder names, etc.

    Extract the downloaded Oracle Java JDK archive in your home folder and rename the newly created folder to "java-7-oracle" - we must move this folder to /usr/lib/jvm using the following commands in terminal:

    Code:
    cd
    sudo mkdir -p  /usr/lib/jvm/ #just in case
    sudo mv java-7-oracle/ /usr/lib/jvm/
    Install Update Java package created by Bruce Ingalls (packages available for Ubuntu 12.04, 11.10, 11.04, 10.10 and 10.04):

    Code:
    sudo add-apt-repository ppa:nilarimogard/webupd8
    sudo apt-get update
    sudo apt-get install update-java
    Now run the following command in a terminal to install Oracle Java JDK:

    Code:
    sudo update-java
    The script will ask you to select the Java version - select "java-7-oracle" for Oracle Java JDK 7, click OK and wait for it to finish:

    Name:  java-update.jpg
Views: 14374
Size:  17.9 KB

    After a few minutes, Oracle Java JDK should be successfully installed on your Ubuntu machine. You can check out the version by running these commands in a terminal:

    Code:
    java -version
    javac -version
    The version should be "1.7.0".

    Install Oracle Java 7 Browser plugin

    The Java browser plugin should be installed automatically. But in case it doesn't show up in your browser, here's what to do.

    Even though the steps below are for Firefox, the plugin will also be updated in Chrome (possibly other browsers too) as it looks under ~/.mozilla/plugins folder for plugins too.

    Firstly, remove old Java plugin links using the commands below:

    Code:
    rm -f ~/.mozilla/plugins/libnpjp2.so ~/.mozilla/plugins/libjavaplugin_oji.so
    sudo rm -f /usr/lib/firefox/plugins/libnpjp2.so /usr/lib/firefox/plugins/libjavaplugin_oji.so
    And for the last step, let's create a simbolic link for the newly installed Java into the Mozilla plugins directory:

    32bit-
    Code:
    mkdir -p ~/.mozilla/plugins
    ln -s /usr/lib/jvm/java-7-oracle/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/
    64bit-
    Code:
    mkdir -p ~/.mozilla/plugins
    ln -s /usr/lib/jvm/java-7-oracle/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/
    And thats it, Now you should have java!

  2. The Following 2 Users Say Thank You to XsMagical For This Useful Post:

    Grimace78 (06-09-2012),king_elite (05-05-2012)

  3. #2
    Newly Nocturnal'd
    Join Date
    Jun 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank U for this excellent guide.
    Clear to understand.
    BTW, shall I uninstall all openjdk progs (like java-7-openjdk-amd64, java-6-openjdk-amd64, etc)?

  4. #3
    Social Media Director XsMagical's Avatar
    Join Date
    Aug 2011
    Location
    Moms Basement
    Posts
    2,143
    Thanks
    173
    Thanked 829 Times in 486 Posts
    Your welcome and you shouldnt have to uninstall the open one unless you feel you need to.

    Sent from my Nocturnal'd ONE XL

  5. #4
    Newly Nocturnal'd
    Join Date
    Aug 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I can follow you all the way until I get to the sudo update-java. It says update-alternatives: error: alternative path /usr/lib/jvm/java-7-oracle/jre/bin/java_vm doesn't exist. I am running ubuntu 12.04 64bit and i downloaded the x64 compressed binary tar.gz edition .
    I looked at the directry path and for me there it goes usr.lib/jvm/java-7-oracle/bin not is there anyway around that so sudo update-java will function?

  6. #5
    N.S.T. evolutionmods's Avatar
    Join Date
    Sep 2011
    Posts
    240
    Thanks
    24
    Thanked 64 Times in 47 Posts
    apon installing Ubuntu 12.04 on another computer i found that you can get Java 6 very easy now. All you have to do is go into the Ubuntu software Center and type java, You will have the option for both 6 and 7. As stated before, If you are developing for Android via Aosp you are going to want to use Java 6. Here are the steps to take.

    These will get rid of previous java software on your comp, But 1st check the software center to make sure java 6 is in there.

    sudo apt-get purge oracle-java7-installer*
    sudo apt-get install ppa-purge
    sudo ppa-purge ppa:eugenesan/java
    sudo apt-get clean
    sudo apt-get update
    Next install java 6 and then sudo apt-get update

 

 

Similar Threads

  1. Replies: 25
    Last Post: 02-06-2013, 11:30 AM
  2. How to Install GNOME Themes in Ubuntu 11.10
    By XsMagical in forum Ubuntu
    Replies: 0
    Last Post: 04-05-2012, 10:59 PM
  3. [Video] How to install & dual boot Ubuntu 12.04 LTS beta
    By XsMagical in forum How To Videos
    Replies: 0
    Last Post: 04-04-2012, 10:29 PM
  4. Replies: 14
    Last Post: 03-31-2012, 04:24 PM
  5. Nocturnal's VeNoM Rom For the HTC EVO 3D Install Video r200
    By XsMagical in forum HTC EVO 3D Videos
    Replies: 0
    Last Post: 03-17-2012, 04:27 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -4. The time now is 09:43 PM.
Powered by vBulletin® Version 4.2.1
Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.
Team Nocturnal Development
vBulletin Skin By: PurevB.com