Revision-13

Components of Java Architecture


How Java Architecture Works


 Java Development Kit (JDK)

Components of the JDK

 Installing the JDK

To install the JDK, follow these steps:


Java Runtime Environment

The Java Runtime Environment (JRE) is a software package provided by Oracle Corporation that enables the execution of Java applications. It includes the necessary runtime libraries, Java Virtual Machine (JVM), and other components required to run Java programs. The JRE ensures platform independence by providing an environment where Java applications can run consistently across different operating systems and architectures.


Java Virtual Machine

The JVM is a virtual machine that provides an execution environment for Java applications. It acts as an intermediary between the Java code and the underlying hardware and operating system. The JVM enables Java programs to run on any platform that supports it, without the need for recompilation.

Components of JVM

JVM Working Principles


 Java Class Libraries

Java Class Libraries are a comprehensive set of reusable classes, interfaces, and APIs that come bundled with the Java Development Kit (JDK). These libraries provide a wealth of functionality that covers various domains, including networking, file I/O, database connectivity, graphical user interfaces (GUI), data structures, cryptography, and more. They serve as a foundation for building Java applications, offering ready-to-use components and tools to developers.

Benefits of JCL


Java Application Programming Interface APIs

An Application Programming Interface (API) is a set of rules and protocols that define how software components should interact with each other. Java APIs, specifically, are collections of classes, interfaces, and methods that provide ready-to-use functionality for developers. These APIs are organized into packages, each focusing on a specific domain or functionality.


Memory Management

Memory management in Java involves allocating and deallocating memory for objects during runtime. Unlike languages like C or C++, Java handles memory management automatically, alleviating developers from manually managing memory allocation and deallocation. This automatic memory management is achieved through the Java Virtual Machine (JVM) and the garbage collector.

Java Memory Model


Garbage Collection

Garbage collection is a core component of memory management in Java. The garbage collector identifies and reclaims memory occupied by objects that are no longer in use, freeing up resources and preventing memory leaks. The JVM's garbage collector automatically handles the process of deallocating memory.