Skip to content

Your JDK: what's inside and which version

โ˜• Java 17 ยท How Java Works Under the Hood ยท 2/3

You know the journey: write, compile with javac, run with java. Now let's set up the toolbox that makes it possible.

Where did the JRE go?

Older tutorials mention the JRE (Java Runtime Environment). Here is what changed:

Up to Java 10 Since Java 11
JRE: JVM + core libraries, to run programs only No separate JRE anymore
JDK: the JRE + developer tools (javac, jarโ€ฆ) JDK contains everything: JVM, libraries and tools

Today the rule is simple: install the JDK, and you have everything needed to write and run Java.

Which version?

A new Java version comes out every six months, but most teams use the LTS versions (Long-Term Support), which stay supported for years:

  • Java 17 โ€” LTS, released in September 2021. This course targets it.
  • Java 21 โ€” the next LTS, released in September 2023. Almost everything in this course applies to it too.

Pick one version and stick with it while you learn.

Which distribution?

Several builds of the same JDK exist. Any of these works for this course:

Distribution Where Notes
Oracle JDK oracle.com/java official, free for development and personal use
OpenJDK jdk.java.net fully open source, same code base
Eclipse Temurin adoptium.net popular free build with long-term support

After installing, check both tools in a terminal:

$ java -version
$ javac -version

Both should report version 17.

IDE or command line?

An IDE (IntelliJ IDEA, Eclipse, VS Code with the Java extensions) gives you autocomplete, error highlighting, a debugger and refactoring tools. Use one for real projects.

But when you click Run, the IDE simply calls javac and java for you. Knowing those two commands keeps you in control: you understand what the IDE does, and you can still build and run a program on a machine without one.

Time to put this into practice with the very first file of our streaming platform.

๐Ÿ’ป Code: Java17_Part_1_Fundamentals_Core_Syntax on GitHub

โ† From source to running program ยท Next: the lab โ†’