
Usually, if you only care about running Java programs on computer you will only install the JRE. It is capable of creating and compiling programs. It has everything the JRE has, but also the compiler (javac) and tools (like javadoc and jdb). The JDK is the Java Development Kit, the full-featured SDK for Java. However, it cannot be used to create new programs. It is a package of everything necessary to run a compiled Java program, including the Java Virtual Machine (JVM), the Java Class Library, the java command, and other infrastructure.
Contains everything required to run Java applications on your system. The JRE is the Java Runtime Environment, it covers most end-users needs. Installing this update will ensure that your Java applications continue to run as safely and efficiently as always.
So to set these variables, first right-click on My PC and select Properties.It's also integral to the intranet applications and other e-business solutions that are the foundation of corporate computing.
If we do not set the PATH variable, we will specify the full path to the JDK bin every time we run a program.įor example: C:\> “C:\Program Files\Java\jdk-11.0\bin\javac” TestClass.java. The CLASSPATH variable provides us with the library files location. The PATH variable in our system provides the exact location of executables that will be used for running Java programs, such as javac and java. We will need to update our system’s Environment variables with our installed JDK bin path to run the Java programs because while executing the programs, the command prompt will look for the complete JDK bin path.
This is the directory structure for our example. If we make any change to this path at all, we need to make a note of it as it will be required in the upcoming steps. JDK gets installed in the C directory of our system by default having the path “C:\Program Files\Java\jdk-11.0”. To recover some of our system’s disk space, it is good practice to delete the downloaded exe file once the download has been done. Click on the Close button once the installation has finished. Click on Next to proceed with the installation, and follow the Installation guide provided for any queries.