The JRE and the JDK are two terms
you hear people mention very frequently in the Java world, and what they are the
two parts that we need in order to run and create Java applications. The JRE is
the Java Runtime Environment. JDK is the Java Development Kit. And so, the JRE
is what you require in order to run Java applications, and end users normally
install the JRE. They're the ones who are going to run our apps. The JDK
provides the tools that we need to create Java apps. So, normally, developers
are the ones who install the JDK on their machines. And in order to develop
apps, you need to run them, so the JDK installation includes a JRE. So how does
all this work together? If we sit down, and we type up a Java source file with
our program code inside of it, and we want to go ahead and run that in some
host environment, how do we do it? A host environment might be Windows, Linux.
It could be Mac. It could even be a browser. It might be a phone running
Android. How do we get from that source code we've typed up to something that
can run on that other computer? Well, that's where the Java Development Kit
comes in. Using the Java Development Kit, we can feed our source code into it,
and it will produce our Java application. Now Java's does not like a low‑level
language like C. C, when you compile a C program, it produces an application
that can run directly on the host computer. Java uses an abstraction called
byte codes that's platform independent. It allows us to not be tied to a host
environment, but we have something that can be run in different host
environments. And that's where the Java Runtime Environment comes in. The Java
Runtime Environment provides what we need for our Java app to display codes
that execute in any host environment. So that's why end users install the Java
Runtime Environment because they just need to run that code. We, as developers,
install the JDK to give us the tools to produce that application.
Comments
Post a Comment
We appreciate your valuable Suggestions/Feedback