Install Oracle Java 7 in [X]Ubuntu 12.04 Precise via PPA

Oracle Java is the alternative to OpenJDK package, but is not longer available in Ubuntu repositories (due to some change in Java License). Oracle Java remains my choice because I find it to work better with some applications (specially java web applets).

If you want to give OpenJDK a try, view here instructions to install it.

“WebUpd8” team provides a PPA with one package that automatically downloads and installs Oracle Java JDK/JRE/Plugin 7 from its official website and installs it on your computer.

Install

Open a terminal window and run:

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

References

Web Upd8

Comments

  1. Seriously, this saved my life ! I've been struggling all day trying to install Java on Xubuntu, but failed miserably. Until i found this! :)

    This works great, it's easy and simple. For everyone else struggling, use this PPA to install!

    Cheers!

    ReplyDelete
    Replies
    1. Thanks for your appreciation. I'm glad to be helpful :)

      Delete
  2. is necessary to uninstall open jdk 6 if i want oracle java 7 or can i have bouth of them? what is the best choice? now i have mint 13 xfce

    please help!

    publius

    ReplyDelete
  3. You can install both. Then you can use the command: "sudo update-alternatives --config java" to choose between them.

    I only use the Oracle version because I need to use a program that doesn't work very well with OpenJDK, otherwise I would only use OpenJDK.

    ReplyDelete
  4. and i have another problem: how to add a new user? with google is nothing to find!
    thank you!

    ReplyDelete
    Replies
    1. To add a new user go to: Applications Menu > System > Users and Groups. Probably tomorrow I'll write a new post on the subject, with screenshots explaining the process.

      Delete
  5. thank you for the answers!

    my admiration for your blog! best!

    ReplyDelete
  6. I find Java really confusing. There is so many different files when I look java up in its directory, and I am not sure what I use for what. Is there a good article to read about Java on linux?

    ReplyDelete
    Replies
    1. Java is cross-platform, so once you understand the technology it doesn't matter which system you're run it on. I hope that this getting start guide will make things clearer: http://goo.gl/AjLVc

      At glance there are to main tools:
      javac - to compile source code
      java - to run java programs

      Another tool that's often used by developers is the "javadoc" which produces documentation for the source code.

      Finally there are two more tools for running applications:
      javaw - similar to java but its doesn't have an associated console window. But since you're running Linux you can ignore it, because it's a MS Windows command.
      javaws - used to run web start applications (http://goo.gl/SfuUF)

      Delete
  7. Thanks for sharing, I will bookmark and be back again












    Java Training Courses

    ReplyDelete
  8. Thanks for sharing..Works perfectly..

    ReplyDelete
  9. As a Linux noob - Thank you!

    ReplyDelete
  10. Thanks for this tip! I'd been looking for Oracle Java for my Xubuntu 13.04.

    ReplyDelete
  11. Thanks For your guidance, but unfortunately it show me some dpkg problem

    ReplyDelete
  12. Thank you so much, I'm surprised that this still works!

    ReplyDelete
  13. You, sir, are a god! This still freakin' works!

    ReplyDelete

Post a Comment

Popular posts from this blog

[HOW TO] Create QR Codes in Xubuntu 12.04

[FIX] VLC is unable to open the MRL (smb://)

Add items to Xfce Applications Menu