Results 1 to 5 of 5
-
04-05-2012 #1Social Media Director
- 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:
Install Update Java package created by Bruce Ingalls (packages available for Ubuntu 12.04, 11.10, 11.04, 10.10 and 10.04):Code:cd sudo mkdir -p /usr/lib/jvm/ #just in case sudo mv java-7-oracle/ /usr/lib/jvm/
Now run the following command in a terminal to install Oracle Java JDK:Code:sudo add-apt-repository ppa:nilarimogard/webupd8 sudo apt-get update sudo apt-get install 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:Code:sudo update-java
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:
The version should be "1.7.0".Code:java -version javac -version
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:
And for the last step, let's create a simbolic link for the newly installed Java into the Mozilla plugins directory: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
32bit-
64bit-Code:mkdir -p ~/.mozilla/plugins ln -s /usr/lib/jvm/java-7-oracle/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/
And thats it, Now you should have java!Code:mkdir -p ~/.mozilla/plugins ln -s /usr/lib/jvm/java-7-oracle/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/

Sign up for Copy and we'll both get 5 GB of free cloud storage in addition to the usual 15 GB:


Nocturnal Roms for the following devices:
||HTC One||Samsung Galaxy S4||Nexus 4||LG Optimus G||HTC One X||HTC Evo 3D||HTC Evo 4G LTE||
-
The Following 2 Users Say Thank You to XsMagical For This Useful Post:
Grimace78 (06-09-2012),king_elite (05-05-2012)
-
06-26-2012 #2Newly 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)?
-
06-26-2012 #3Social Media Director
- 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

Sign up for Copy and we'll both get 5 GB of free cloud storage in addition to the usual 15 GB:


Nocturnal Roms for the following devices:
||HTC One||Samsung Galaxy S4||Nexus 4||LG Optimus G||HTC One X||HTC Evo 3D||HTC Evo 4G LTE||
-
08-21-2012 #4Newly 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?
-
09-14-2012 #5
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.
Next install java 6 and then sudo apt-get updatesudo 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
Similar Threads
-
[Video] How to install ADB in Ubuntu Linux 12.04 & 11.10 LTS 32bit & 64 April 5, 2012
By XsMagical in forum How To VideosReplies: 25Last Post: 02-06-2013, 11:30 AM -
How to Install GNOME Themes in Ubuntu 11.10
By XsMagical in forum UbuntuReplies: 0Last Post: 04-05-2012, 10:59 PM -
[Video] How to install & dual boot Ubuntu 12.04 LTS beta
By XsMagical in forum How To VideosReplies: 0Last Post: 04-04-2012, 10:29 PM -
[Video] How to install Ubuntu 11.10 Inside windows the easy way
By XsMagical in forum How To VideosReplies: 14Last Post: 03-31-2012, 04:24 PM -
Nocturnal's VeNoM Rom For the HTC EVO 3D Install Video r200
By XsMagical in forum HTC EVO 3D VideosReplies: 0Last Post: 03-17-2012, 04:27 PM




Reply With Quote

Bookmarks