What does JDK mean? Why is it important?

Nikhil Nambiar
2 min readApr 21, 2021

--

If you are learning Java, you have to install the JDK (Java Development Kit).

It is important for you to understand, how Java works in the background. This knowledge will help you stand on a firm foundation of knowledge.

Think of the JDK as an airport.

You have to go to the airport to get on a plane. In the same way, you need JDK to run Java.

When you go to the airport, you can’t just get into the plane. You have to go through security (unless you are cool celebrity that walks into their plane while on their phone). Similarly, the JDK has a compiler, that checks your code for rule violations. If you violate rules, you can’t move forward. Similarly, when the Java compiler notices violations, the code can’t move forward. These issues are called compilation errors.

You took that big shampoo bottle out of your carry on luggage. Phew! Now you are ready to go through security. Success! You did not violate any rules, you can now get to your gate in peace. Similarly, the Java compiler lets the code through to the next stage if no rules are violated.

Before you board, you need to scan your plane ticket. In the same way, the JDK has a JVM (Java Virtual Machine) that takes your compiled code and converts that machine code, so that your machine can understand what you wrote.

Guess what?! You scan your ticket, and they see a red light. Oh no, what’s going on, looks like your ticket has an issue. In the same way, there can be an issue while the JVM is converting the compiled code to machine code. These errors are called run time errors.

To your relief, a friendly airline staff member has fixed the issue. You give them a high five, and now the light flashes green. You jump on your flight and travel safely. In the same way, once the errors are resolved and there are no run time errors. The JVM successfully instructs the machine to act according to your code.

In summary, the Java Development Kit has 2 major components the compiler and the JVM. The compiler checks the code against rules, and converts it into compiled code (also known as bytecode). The JVM takes the byte code and converts that into machine code for the machine to understand.

If you understand this concept, congratulations! You know more than a lot of Java developers out there. Keep coding, Keep learning. Bon Voyage.

--

--