Java JDK

“Uncertainty is intrinsic to the process of finding out what you don’t know, not a weakness to avoid” John Brockman

The underlying computer that is going to run a Java program does not know anything about the source codes that are written in the Java language. After all, computers only know 0s and 1s.

So in order to run a program that is written in Java language, we need an application that can convert a Java source code into machine code so that the computer can run it.

This is where JDK comes in.

JDK stands for Java Development Kit and it has multiple tools like:

Compiler

By which we can compile a Java source codes into bytecodes.

What is JRE:

JRE stands for Java Runtime Environment and it has the JVM and the prewritten libraries and classes that can be used to build Java applications.

Note: The motto of Java is “Write Once and Run Everywhere”. This means you can write your source code once and run it on any computer.

This is because of the JVM.

What is JVM:

The JVM stands for Java Virtual Machine and it’s an application that knows the language of many different types of computers.

This software is first installed in the target machine and it takes the bytecodes that the Java compiler produces from our source code, and translates it into the target machine code.

You can think of it as the middle man between our program and the target machine.

If JVM could speak, it would say: “I can speak with many computers and all I need is a compiled Java source code (bytecode) so that I can translate it in a way that those machines can understand. But remember I need to be installed on those machines as well”

Now that we know what JDK is and why we need it, let’s see where we can find and how to install it on a computer.

Where to download JDK:

There are two websites that we can download JDK from:

Oracle:

https://www.oracle.com/de/java/technologies/javase-downloads.html

Red Hat:

https://developers.redhat.com/products/openjdk/download

Here are the guides for installing JDK for different platforms:

Linux:

https://docs.oracle.com/en/java/javase/11/install/installation-jdk-linux-platforms.html#GUID-737A84E4-2EFF-4D38-8E60-3E29D1B884B8

Microsoft Windows:

https://docs.oracle.com/en/java/javase/11/install/installation-jdk-microsoft-windows-platforms.html#GUID-A7E27B90-A28D-4237-9383-A58B416071CA

MacOS:

https://docs.oracle.com/javase/10/install/installation-jdk-and-jre-macos.htm#JSJIG-GUID-2FE451B0-9572-4E38-A1A5-568B77B146DE

How to Verify Java Version