Installing Sun Java 7

From OpenCog



This page describes how to install Sun Java 7, which is required for PyCharm among other things.


This page has the following prerequisites:


Sadly Sun Java 7 does not install through Ubuntu software center, so we'll have to do the procedure manually. We'll be uninstalling OpenJDK first (which shouldn't be present in a fresh Ubuntu installation, but can give problems if you've installed it yourself).

To get rid of OpenJDK, open a terminal window and type the following command.

sudo apt-get purge openjdk*

Then we need to add the repository that we'll be downloading Java from. You'll need to press Enter to confirm that you want to add it.

sudo add-apt-repository ppa:webupd8team/java

Followed by and update of apt-get.

sudo apt-get update

And then we can run the command to download and install Java. You'll be asked to confirm several things along the way, such as disk space requirements and the license agreement.

sudo apt-get install oracle-java7-installer

To test if all has gone well, type

java -version

The output should look something like this:

java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)

That's it, we're done!

Next Steps

You can now continue with the installation of PyCharm if you want to do OpenCog in Python. See Installing PyCharm for details.


What did I need this for again?

The main reason for newcomers is that PyCharm requires this Java environment to start. So you could proceed with that proecedure next (see Installing Pycharm for details).