Preface to Java - Part I

Preface to Java - Part I

Something before "Hello World!!!"

Mukul Kumar Chaundhyan's photo
Mukul Kumar Chaundhyan
ยทFeb 16, 2021ยท

3 min read

Java is one of the most used programming languages in the whole world. I bet it could be within the Top 50 as well if we consider the whole universe.๐Ÿ˜œ

At this point while I'm drafting this masterpiece Java is at their version 15, 15.0.2 to be specific. It's been almost two and a half decades since it's released for the public. Having said that there exist many common topics that are mostly overlooked when people are more interested in writing the Hello World !!!

Let's learn the preface of Java.

Before that let's quickly take a look at how the Java Program executes.

STEP 1: You write the instructions in the .java file.

STEP 2: That file is then compiled and converted in byte code as a .class file.

STEP 3: This .class file or byte codes are then executed to produce the result.

The 3 components of the Java Toolkit.

JVM (Java Virtual Machine)

JVM is an engine that executes the byte codes from the .class files onto the host machine/OS. I hope you remember the famous Java term, "Write Once, Run Anywhere". The byte code is always the same(written once) and then we do have different JVMs for different OS like Linux, Mac, Windows. So, it's JVM's responsibility to make sure your code runs anywhere, which means executes on any platform(OS).

JRE (Java Runtime Environment)

JRE is a bundle of core libraries that are used to run the program. It is basically used when you only need to run your java program but don't wish to build any. This includes the JVM itself.

JDK (Java Development Kit)

JDK, as the name suggests itself, it is the whole kit that is used to develop, test, and monitor the java based applications. This includes a variety of libraries that are released as per the Java release plan. If you want to build any Java-based application, you must be downloading the JDK.

I hope now it would be pretty clear to you all as what all the components and they are linked together. ๐Ÿ˜Ž

Share this