JAVA ARCHITECTURE

JAVA ARCHITECTURE

The Java architecture defines the components that are essential to carry out the creation and execution of code written in the Java programming language. The various components of Java architecture are:
New Text Document.jpg
  • Source file: Java is a robust programming language that enables developers to build a wide variety of applications for varying purposes. In order to write a Java programs or applications, you need to write certain codes. A java application contains the source code that enables an application to provide its desired functionalities. This source code saved in a source file with the extension .java.
  • Class file: Once created a .java file is compiled to generate the .class file. A class file contains the bytecode that is generated by the compiler. Further, this class file can be executed by any machine that supports the Java Runtime Environment (JRE).
  • JVM: The JVM is an application that is responsible for executing Java programs on a computer. It resides in the Random Access Memory (RAM) and is specific for every platform, such as Sun and Macintosh. The bytecode generated during the compilation of a program is the machine language of the JVM. JVM is responsible for executing the bytecode and generating the machine specific code for the machine on which the java program needs to be executed.
    • Class loader
    • Execution engine and Just-In-Time (JIT) compiler
    • Bytecode verifier
      • Class loader: The class loader loads the class file required by a program that needs to be executed. The classes are loaded dynamically when required by the running program.
      • Execution Engine and JIT compiler: The Java execution engine acts as an interprets the bytecode one line after another line and executes it. The line-by-line interpretation is a time-consuming tasks and reducing the performance of a program. To enhance the performance, the JIT compiler has been introduced in the JVM. The JIT compiler compiles the bytecode into the machine executable code, as and when needed, which optimizes the performance of a Java program.
      • Bytecode Verifier: Before being executed by the JVM, the bytecode is verified by the using the bytecode verifier. The bytecode verifier ensures that the bytecode is executed safely and does not pose any security threat to the machine.
    • API: The Java API is a collection of software components, such as classes, interfaces and methods, which provides various capabilities, such as GUI, date, time and calendar. The related classes and interfaces of the Java API are grouped into packages (A package is a container of classes).

Comments

Popular posts from this blog

Introduction Of JAVA

OOPs Concepts