How can I install Java on Ubuntu 12.04?
- Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
- Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
To install the latest version of Oracle Java (the latest posted in the Oracle webpage), the easiest way is to use the Java Installer (as flashplugin-installer does) as here is explained: http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
Then, you have to do only this:
And type this to check the version:
PPA are not a secure / smart way of installing something. Installing JDK is very simple and straightforward.
The Steps are as followed:
Download latest jdk from Oracle's site and extract:
Create some symbolic links:
Similarly, symbolic links can be created for other commands of JAVA. Other available commands are:
Ensure right users have the right permission:
Reference: Coders of tHe Dark | Blog
As said above installing from that PPA is the easiest way to do it. Though it might take a day or two for it to be updated to the newest version 7u25. If the problem you experience is a pop-up window saying "Application blocked by security settings", and you really need to use java right now, you can bypass it by decreasing you security level for java. Go to your menu -> preferences -> Oracle java 7 plugin control panel. In there open the security tab, and move the slider to "medium", and apply. That should do the trick.
Hope it helps.
If you get error message like