loading...
Cover image for 2. Installation of Java

2. Installation of Java

erraghavkhanna profile image Raghav Khanna ・2 min read

2.1. Recommended Java version
It is recommended to use last least the latest long-term release version of Java. Currently this is Java 11.

2.2. Check installation
To run Java programs, you:

must have the Java runtime environment (JRE) installed

the Java executables must be available in your path environment

You can test if the JRE is correctly installed via a console. To open a console on Windows: Win+R, enter cmd and press Enter). Now type in the following command:

java -version
If the JRE is correctly installed, this commands prints information about your Java installation. In this case you can skip the Java installation description.

If the command line returns the information that the program could not be found, you have to install Java.

2.3. Install Java
For Microsofts Windows, Oracle provides a native installer which can be found on the Java website (http://java.com/). It contains instructions how to install Java for all supported platforms.

Install Java on Ubuntu
On Ubuntu you can install Java 11 via the following command on the command line. These commands might change over time, if they do not work anymore please Google for the installation.

in case you prefer the Oracle Java distribution

you can alternatively use the following commands

sudo add-apt-repository ppa:linuxuprising/java
sudo apt-get update
sudo apt-get install oracle-java11-installer
2.4. Installation problems and other operating systems
If you have problems installing Java on your system, search via Google for How to install JDK on YOUR OS. Of course, replace YOUR OS with your operating system, e.g., Windows, Ubuntu, Mac OS X, etc. This should result in helpful links.

Posted on by:

erraghavkhanna profile

Raghav Khanna

@erraghavkhanna

Web designer | Cloud computing | Script developer | Hacker | Bug Hunter |

Discussion

pic
Editor guide