0% found this document useful (0 votes)
41 views9 pages

Harshika - Java Architecture

The document discusses the Java architecture including the JDK, JRE, and JVM. It explains that the JDK is used for compilation, the JRE provides the runtime environment, and the JVM interprets byte code and executes the program. Memory in Java is divided into stack and heap areas, with the stack used for method calls and the heap for object instantiation.

Uploaded by

Pavithra Prakash
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views9 pages

Harshika - Java Architecture

The document discusses the Java architecture including the JDK, JRE, and JVM. It explains that the JDK is used for compilation, the JRE provides the runtime environment, and the JVM interprets byte code and executes the program. Memory in Java is divided into stack and heap areas, with the stack used for method calls and the heap for object instantiation.

Uploaded by

Pavithra Prakash
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

JAVA

ARCHITECTURE
Presentation done by Pavithra Prakash
JAVA ARCHITECTURE
o Java Architecture is a collection • There is a process of compilation
of components, i.e., JVM, and interpretation in Java.
JRE, and JDK. • Java compiler converts the Java
o It integrates the process of code into byte code.
interpretation and compilation. • After that, the JVM converts the
o Java Architecture explains each byte code into machine code.
and every step of how a program • The machine code is then
is compiled and executed. executed by the machine.
JAVA DEVELOPMENT KIT (JDK)
• Java Development Kit is a bundle of software development tools and
supporting libraries combined with the Java Runtime Environment
(JRE) and Java Virtual Machine (JVM).
• Installing a JDK in your development environment is used to compile a
Java program.
• JDK is used to compile the JAVA code (High Level Language) to Byte
code (Intermediate Level Language).
• This process comes under Compilation Phase.
JAVA RUNTIME ENVIRONMENT (JRE)

• The Java Runtime Environment (JRE) is software that Java programs


require to run correctly.
• Java is a computer language that powers many current web and
mobile applications. The JRE is the underlying technology that
communicates between the Java program and the operating system.
• JRE provides an environment in which Java programs are executed.
• JRE takes our Java code, integrates it with the required libraries, and
then starts the JVM to execute it.
JAVA VIRTUAL MACHINE (JVM)
• A Java Virtual Machine (JVM) is a program that interprets Java byte
code to run as a program by providing a runtime environment that
executes this process.
• It is a software which takes Java byte code and converts the byte code
(line by line) into machine understandable code (Machine Level
Language).
• This process comes under Execution Phase.
HEAP MEMORY
• The Java heap is the area of memory used to store objects
instantiated by applications running on the JVM.
• When the JVM is started, heap memory is created and any objects in
the heap can be shared between threads as long as the application is
running.
• The heap is an area of memory available to allocate areas (“blocks”)
of memory for the program.
STACK MEMORY
• Stack memory is a memory usage mechanism that allows the system
memory to be used as temporary data storage that behaves as a first-
in, last-out buffer.
• Stack Memory in Java is used for static memory allocation and the
execution of a thread.
• Access to this memory is in Last-In-First-Out (LIFO) order.
STACK VS HEAP MEMORY
PARAMETER STACK HEAP

Application It stores methods, variables. It stores objects and Java Runtime


Environment (JRE) classes.
Flexibility It is not flexible because we cannot It is flexible because we can alter the
alter the allocated memory. allocated memory.
Efficiency It has faster access, allocation, and It has Slower access, allocation, and
deallocation. deallocation.
Memory Size It is smaller in size. It is Larger in size.

Allocation/Deallocation It is done automatically by It is done manually by


the compiler. the programmer.
Order of Allocation Memory allocation is continuous. Memory allocated in random order.

You might also like