I just started learning Java, and I am installing the OpenJDK from Amazon Corretto. Why do I need to install this JDK? I am coming from a Python background where I only needed to install the "Python 3" program from the official Python website. Why can't I just install Java? I'm assuming JDK has features that aren't just in Java? What are these extra features?
When you install just Java, you are installing the JRE, or the Java Runtime Environment. This guy allows you to run your program inside the Java Virtual Machine (JVM), and is the java
command.
When you install the JDK, or the Java Development Kit, you are installing everything that the JRE has, but you are also installing the compiler javac
, which is capable of compiling Java programs. These compiled Java programs can then be run in the Java Runtime Environment.
Python, on the other hand, is not a compiled language -- but rather an interpreted one. Therefore it must have its equivalent of the JRE
and JDK
in one package.