What is the JDK, JRE and JVM

If you are new to the world of java you may well have heard these terms but not be too sure that they are. So ill try and make these understandable.

What is the JVM

The JVM or Java Virtual Machine, is like a computing environment inside you computers operating system. The JVM is designed to provide a platform for languages that run on the JVM to operate. It effectively provides a consistent environment within different operating systems that mean languages that run on the JVM, such as Java, can be portable between different platforms. This is why you will find that the code that you run on a windows system can also run on a Unix or other systems too.

That’s not the whole story, but one of the big features of the JVM is that it allows you to create portable code, without worrying about the internals of a particular computers design or operating system. Vendors implement the JVM based on the JVM specification which is maintained by Oracle, the owners of Java. JVM languages such as Java are compiled into bytecode which runs on the JVM. This bytecode could in theory be run on any JVM.

What is the JRE

The Java Runtime Environment or JRE consists of a JVM that we have discussed above, plus some standard libraries that are provided with each JVM implementation. This provides the platform for us to execute our java code on a given system. If you just want to run Java code on a given system you need a JRE as a minimum.

What is the JDK

The JDK is what you need to develop Java code. It consists of the JRE as described about, the java compiler, plus a number of other useful tools for developing and debugging Java code. If you want to develop java code as a minimum you will need a JDK.

Leave a Comment

Your email address will not be published.