Understanding the difference between JDK and JRE in Java is important. There are many differences between these two. The main differences between JDK and JRE is that JDK is a set of software that is used to develop Java based applications. On the other hand, JRE is an implementation of Java Virtual machine (JVM) that actually executes Java programs.
What is JDK?
JDK stands for Java Development Kit that was released Oracle Corporation in the form of binary product to assist the Java developers developing over Windows, Linux, Mac OS X, and Solaris. It is an implementation of either of the Java SE, Java EE or Java ME. It includes a private Java Virtual Machine (JVM) and various other components to finish the recipe to a Java Application. It is the widely used Software Development Kit (SDK). The primary components of JDK are mainly: appletviewer, apt, extcheck, idlj, jabswitch, java, javac, jar, javah, javap, javaws, keytool, pack200, policytool, VisualVM, wsimport, jrunscript, xjc, etc.
What is JRE?
JRE stands for Java Runtime Environment that enables the developers to run applications and applets that are written in Java programming language. These applets allow the developers to have a much greater experience online than simply interacting with static HTML pages. It is also the product of Oracle Corporation and contains a stand-alone Java VM (HotSpot), browser plugin, Java standard libraries and a configuration tool. It is the most common Java environment installed on Windows PCs and is available for free for the official website of Java.
- JDK is a basic requirement for developing Java applications. JRE is a plug-in that is required for running Java programs.
- JDK needs more disk space as it contains JRE along with various development tools. JRE is smaller than the JDK that’s why it takes less disk space.
- JDK includes set of API classes, JRE, Java compiler, Webstart and other important files that are required to write Java applications and applets. JRE includes the JVM, Core libraries and other important components that are required to run applications and applets written in Java.
- JDK is a set of software that is used to develop Java based applications. On the other hand, JRE is an implementation of Java Virtual machine (JVM) that actually executes Java programs.
- JDK contains JRE plus development tools while JRE is an implementation of JVM.