How to install oracle java 7 in ubuntu 13.04/12.10/12.04

Java is a programming language and computing platform first released by Sun Microsystems in 1995. It is the underlying technology that powers state-of-the-art programs including utilities, games, and business applications. Java runs on more than 850 million personal computers worldwide, and on billions of devices worldwide, including mobile and TV devices.

Preparing your system

First you need to remove openjdk for this run the following command from your terminal

sudo apt-get purge openjdk*

If you installed java 7 from any other PPA and you are having problem with java then you have to do following steps before installing the PPA menctioned here

sudo rm /var/lib/dpkg/info/oracle-java7-installer*
sudo apt-get purge oracle-java7-installer*
sudo rm /etc/apt/sources.list.d/*java*
sudo apt-get update

Install oracle java 7 in ubuntu 13.04/12.10/12.04

Open the terminal and run the following commands

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

You can check the java version by searching java in dashboard

Sponsored Link

Incoming search terms:

Related posts

83 thoughts on “How to install oracle java 7 in ubuntu 13.04/12.10/12.04

  1. sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update
    sudo apt-get install oracle-java7-installer
    “For Uninstallation”
    sudo apt-get remove oracle-java7-installer

    How exactly it works?

  2. ohh thank you,its long time i were trying to install but gives me alot of an error,but this its useful

  3. wrong: sudo apt-get purge openjdk*
    correct: sudo apt-get purge ‘openjdk*’
    a glob expansion could occur.

    wrong: sudo apt-get purge openjdk*
    correct: sudo apt-get purge ‘^openjdk.*’
    a purge(search, remove) option take a regular expression not a glob expression.

  4. The minimal ubuntu server install does not include add-apt-repository. You can install it with the following prior to running the other commands.

    sudo apt-get install software-properties-common

  5. Just wanted to say thanks. I’ve referred to this article more times than I can remember. Muchas gracias!

  6. Awesome! I´ve searched a long time for that solution. Now it works. I am happy. God bless you my friend! 😀

  7. LOOK UP “CGA SAYS” ON THIS PAGE AND FOLLOW THEIR VERY SIMPLE INSTRUCTIONS! YOU’RE WELCOME.

  8. Had problem with my Java 7 in Ubuntu 12.10. Followed these instruction to the letter, worked perfectly. Thank you!

  9. Just tried to install a Tekkit (Minecraft) server on my Linux box – thought it might be the Java 6 install of OpenJDK I had installed. Using your guide allowed me to get rid of that and get Oracle’s 7 installed in no time at all – and the Tekkit server is working nicely. Great job!

  10. Just great! the only answer, i’ve finally found to this problem…opensource java does not work…thanks

  11. This worked but I would recommend using the Ubuntu Software Center rather than purging file and applications.

  12. Fun watching the terminal get the job done.. when java8 comes out do you just change the linecommand from 7 to 8?

  13. Man, I love you 😀 I’ve been trying to install java with the instructions on ubuntu wiki, with official instructions on java.com, but nothing helped… This did!
    I don’t know who you are, I don’t know where you are, but I will find you and I will thank you 🙂

    (btw Ubuntu 13.04 here, works like a charm)

Leave a comment

Your email address will not be published. Required fields are marked *