Is it ok to install Java 7 in Ubuntu 12.04?

6,917

Solution 1

  • Yes, it's perfectly OK to install Java 7 on Ubuntu. In fact, you can install and use multiple versions of Java, from multiple vendors, at the same time!

  • The reasons some don't recommend Java 7 as a replacement for Java 6 yet, for end-users, include:

    • Java 7 is still relatively new and "maturing"
    • Most of the Java apps/code out there was written for Java 6 and works perfectly with it
    • Java 7 should be able to run the above too, but rarely there's a bug and it fails or causes problems.
  • As this link from May 2012 explains, while Java 7 has been available for developers since mid-2011, Oracle only started upgrading Windows users to Java 7 in May 2012, and it is still offering and recommending Java 6 to Linux and Mac users.

  • Bottom-line: if you are a developer, get Java 7. If you are a user, you can get it too but keep Java 6 around. This question explains how you can install multiple Java versions and use a graphical utility to chose which is the "default" Java

Solution 2

Java 7 work great. I've been running it for at least 2 months, and no problems. To install Oracle Sun Java, Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below.

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

For Open JDK

sudo apt-get install openjdk-7-jre

Or from Ubuntu Software Center

Share:
6,917

Related videos on Youtube

ish
Author by

ish

Updated on September 18, 2022

Comments

  • ish
    ish over 1 year

    I've read a lot that Java 6 works better and that it's not recommended to use Java 7, is this true? And why is Java 7 not a good option?

  • leesei
    leesei almost 12 years
    Could you explain the difference between the 3 and which would be better for Ubuntu 12.04? I've used Oracle's one previously on Windows but if you're able to I'd be interested in knowing upsides/downsides to each of them if there are any. (eg. more regular updates or better support on Linux are just 2 examples)
  • Mitch
    Mitch almost 12 years
    The last 2 are the same. One is done from terminal, and the other from software center. The top one is the Oracle Sun version of Java. You can run them side by side. To get an idea see Why should I use the Oracle JDK over the OpenJDK, or vice-versa?
  • leesei
    leesei almost 12 years
    Thanks a lot for the explanations and the link! Sorry for the pointless question I was kind of slow and didn't remember yesterday that USC = Ubuntu Software Centre...
  • William Nelson
    William Nelson over 11 years
    this worked great! tyvm!