1. Overview

Whether you are a Java developer or a user of Java desktop applications, you need to know how you can install Java on your machine.

In this article, let's take a look at how we can install Java on Windows.

2. Content

In order to have a clean installation, let's take a step-by-step approach, by verifying the Java version both before and after installation.

First, open the command prompt and check if you already have Java installed on your machine. if yes, what's the version.

Command to verify installed Java version.

java -version

Command to verify installed Java compiler version (mostly same as Java version).

javac -version

If you don't have Java installed or you want to install a different version than the one that you already have, then download and install Java from the official website.

When we talk about Java, we are talking about the common package "Java Standard Edition Development Kit" or simply JDK, which includes both JRE and Development Tools.

Oracle Java Official Website

2.1. Who needs what?

If you are a Java application developer, you need JDK, as it includes JRE with all the essential Development Tools, that are required for application development, debugging, and monitoring.

If you are just a user of Java desktop applications, you simply need JRE, but there is no harm in installing JDK as it includes JRE.

We have a separate article explaining JVM, JRE, and JDK, which can be referred to for more details.

3. Conclusion

We should know how to install Java on Windows without any issues.

In case of any issues, do check our other articles on Java issues which have details on how to fix them.