DEV Community

Jayashree
Jayashree

Posted on

Java Architecture

What is Java Architecture?
There are two processes in Java — Compilation and Interpretation.

  • The Java source code goes to the compiler.
  • The Java Compiler converts it into byte codes
  • The bytes codes are then converted into machine by the JVM
  • The Machine code is executed directly by the machine(Operating System)

Java Architecture
Components of Java Architecture
The different components of Java architecture are

  • JRE — Java Runtime Environment
  • JDK — Java Development Kit
  • JVM — Java Virtual Machine

Java Runtime Environment(JRE)
Java Runtime Environment provides an platform where all the applications like JVM and other runtime libraries linked together to run your Java Program. It builds a runtime environment where you can execute the Java program. The JRE also initiates the JVM for its execution. JRE has the required software and libraries to run the programs.

Java Development Kit (JDK)
Java Development Kit is the set of libraries, compiler, interpreter and other set of programs that will help you to build the Java program. Once JDK installed on machine then start developing, compile and run the Java program. You cannot compile Java program without JDK installed on machine. Once you compile the code with JDK tools, you can get an Byte Code File.

  • java : it is the launcher for all the java applications.
  • javac : compiler of the java programming languages.
  • javadoc: it is the API documentation generator.
  • jar: creates and manage all the JAR files.

Java Virtual Machine(JVM)
JVM is the interpreter that executes the byte codes into Machine code(instructions). The beautiful quality is WORA( Write Once Run Anywhere). This means code can runs its applications on any platform. This makes Java as Platform Independent.

JVM performs the following functions:

  • Loads the code
  • Verifies the code
  • Executes the code
  • Provides runtime environment
  • The below architecture depicts the architecture of the JVM.

Top comments (0)