The basics

It’s my first time learning this language too, so we just ball together.

How Java compiles its code

When we have a java file, something like ThisIsAJavaFile.java, we are first supposed to compile it which turns the java file into a class file which can then be executed on any machine which has java.

That is so cool.

We need to look at the contents of the JDK as well.

What the JDK?

JDK - Java Development Kit
JRE - Java Runtime Environment
JVM - Java Virtual Machine

The JDK compiles the .java file and produces a .class file.
It has development tools like javac which is the java compiler.

The JRE is an environment where the .class files can be executed.
Inside the JRE we have JVM which is like an intermediate between the Java bytecode and the the underlying OS and hardware.

JDK
├── JRE
│   ├── JVM
│   └── Class Libraries
├── Development Tools
│   ├── javac
│   ├── java
│   ├── javadoc
│   ├── jar
│   └── other tools

References

https://medium.com/@firatmelih/what-is-jdk-jre-jvm-a684b9ab3b00

Updated on