Revision-13
Components of Java Architecture
Java Development Kit (JDK)
Java Virtual Machine (JVM)
Java Runtime Environment (JRE)
Java Class Libraries
Java Application Programming Interfaces (APIs)
Compilation
Loading and Verification
Execution
Memory Management
Library Utilization
Java Development Kit (JDK)
Java Compiler
Java Virtual Machine (JVM)
Java Runtime Environment (JRE)
Development Tools
Libraries
To install the JDK, follow these steps:
Visit the official Oracle JDK website or the OpenJDK website.
Download the appropriate JDK distribution for your operating system.
Run the installer and follow the on-screen instructions to complete the installation.
Set the necessary environment variables, such as JAVA_HOME, to ensure proper functioning of the JDK.
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.
Class Loader
Bytecode Verifier
Just-in-Time (JIT) Compiler
Garbage Collector
Execution Engine
Loading
Verifying
Executing
Garbage Collection
Performance Optimization
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.
Reusability
Faster Development
Standardization
Reliability and Security
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.
Heap Memory
Stack Memory
Method Area
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.