- Published on
Installing Oracle (Sun) Java on Ubuntu 12.04
- Authors

- Name
- Daisuke Kobayashi
- https://twitter.com
On Ubuntu 12.04, only OpenJDK is available by default. I wanted to try IntelliJ this time, and when I installed it, the startup warning recommended Sun Java, so I decided to install it.
sudo apt-get update $ sudo apt-get install oracle-java7-installer
After entering the commands above, the Java installer starts. Just follow the prompts. Once the installation is finished, check the Java version with the command below.
$ java -version
If it prints something like the following, the installation succeeded.
java version "1.7.0_07" Java(TM) SE Runtime Environment (build 1.7.0_07-b10) Java HotSpot(TM) Client VM (build 23.3-b01, mixed mode)