How to Check If Java Is Installed on Ubuntu (And Install If It Isn’t)
Pinterest Stumbleupon Whatsapp

Despite the fact that Java can be problematic, it’s often times a necessary evil. A lot of cross-platform apps are written in Java, and considering how Linux already lacks a lot of useful apps, choosing not to use Java will severely limit your options.

Not sure if Java is installed on your system? Most fresh installations of Ubuntu (and other Ubuntu-based distros) do not have Java installed by default, so if you’ve never installed it before, you probably don’t have it. But to be sure, open Terminal and run this command:

java -version

If it works, you’ll see which version of Java is installed along with some other details that may or may not be useful. If the command isn’t recognized, then Java isn’t on your system.

Installing Java is simple. First you’ll want to update your package and repository information to avoid out-of-date installs and the like:

sudo apt-get update

Once that’s done, you can install Java with this command:

sudo apt-get install default-jre

JRE stands for Java Runtime Environment. It’s all you’ll need to run Java apps on your system. The JDK, or Java Development Kit, is only necessary for programmers who are creating Java apps.

There are actually multiple versions of Java available to Linux users. The above command will install the latest available version of OpenJDK’s JRE, which is the version we recommend. If the above command doesn’t work, you can try this instead:

sudo apt-get install openjdk-8-jre

It may take a while depending on how slow your system is, but that’s about it. Once it’s done, Java will be ready to use and you’ll be able to install and play Minecraft on Linux, for example.

What do you need Java for? Could you live without it? Let us know in the comments below!

Enjoyed this article? Stay informed by joining our newsletter!

Enter your Email

Leave a Reply

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

  1. Doc
    January 9, 2017 at 4:28 pm

    As Java is one of the most hated (second only to Adobe Flash) plugins among security gurus, what's the point of having it installed? I've found it to be slow, buggy, and riddled with security holes. I've requested all my users uninstall it (I'm the tech department for a SMB), and the only use I've found for it is for preflighting eBooks (and I've stopped using it for that!)