What is the difference between a JDK and a JVM in Java?

CWC
2 Min Read

JDK stands for Java Development Kit. It is the main component of Java environment. It provides all executable, tools and binaries needed to compile, execute and debug a Java program. JDK is a software that is specific to each platform. The installers for this software are separate for Mac, Windows and Unix systems. It is prudent to state that JDK is superset of JRE because it has JRE with Java compiler, core classes, and debugger. Current version of JDK is Java 7, also known as JDK 1.7.

Developers who want to work with an Integrated Development Environment can download a JDK from Oracle website. This JDK is bundled with Netbeans. Such IDEs make the development process fast. This is because they introduce drag-and-drop and point-and-click features used to create an application.

JVM is the core of java language of programming. JVM is responsible for converting machine specific code from Byte code. JVM is also specific to each platform. It also has core java functions such as garbage collection, memory management, and security. JVM can be customized using java options such as allocating maximum memory and minimum memory to JVM. JVM is referred to as virtual since it gives an interface that is independent from machine hardware and underlying operating system. This independence from operating system and hardware makes java write-once run-anywhere. JVM architecture enables control over the performance of Java applications. In case execution is done remotely, the code is signed using a certificate.

JVM also has software implementations that include just-in-time compiler that produce machine codes for methods that are frequently used. Since machine code is language native to CPU, it can be executed quicker than interpreting Bytecode. Hence you do not require learning how the JVM works to run java applications or to develop them. All you need is some understanding of how it works to avoid performance problems.

Share This Article
1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

English
Exit mobile version