JDK vs JRE vs JVM

JDK vs JRE vs JVM

JDK(Java Development Toolkit) – contains JRE + Other libraries to develop applications

It provides the amenities for developing java based applications. Basically it contains components like JRE(Java Runtime Environment), java source compiler(javac),java libraries,java debuggers,java documentation,bundling and other development tools.

Some of the important tools are mentioned below:

  • jar – an utility to create and manage Java Archive (JAR) files.
  • java – the launcher for Java applications.
  • javac– java compiler.
  • javap – class file disassembler.
  • jhat – heap analysis tool.
  • javadoc – API documentation generator.
  • keytool – It is a key and certificate management utility.
  • jarsigner -to sign and to verify the signature on .jar files.
  • appletviewer – to run applets.
  • xjc – generate JAXB classes from XSD.
  • wsimport – The wsimport tool reads a WSDL and generates all the required artifacts for web service development, deployment, and invocation.
  • wsgen – The wsgen tool reads an existing web service implementation class (SIB) and generates the required JAX–WS portable artifacts for web service development and deployment.
  • schemagen – generate an XML schema file from a Java class.
  • jconsole – graphical tool for monitoring a JVM.

JRE(Java Runtime Environment) contains JVM + Other libraries to run applications

It contains the specific implementation of the java virtual machine(JVM).It also contains core java libraries and other components to run java based applications.

Java Virtual Machine(JVM) the real guy who actually executes bytecodes

It is the abstract specification.Concrete implementations exists for different platforms.JRE contains the specific implementation of JVM.JVM basically provides the runtime environment for the java application.A runtime instance of JVM runs a single java application.

For understanding the nitty gritty of JVM, please visit Java Virtual Machine(JVM)

JDK,JRE and JVM are Platform dependent but Java is Platform independent

We have different versions of JDK/JRE/JVM for different platforms like Windows,Unix and MacOs.Then how is java platform independent?
It’s because the bytecode generated after java compilation is platform independent.
Let’s say we compile source code on Windows.Now we can execute the same compiled code (bytecode) on any platform running a JVM.

Leave a Reply

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