SlideShare a Scribd company logo
Java RunTime Data Areas
JDK VS JRE vs JVM
Similarity
JVM, JRE and JDK are platform dependent because configuration of each OS differs.
But, Java is platform independent.
JVM (Java Virtual Machine)
● ~ is an abstract machine
● ~ is a specification that provides runtime environment in which java bytecode can be
executed.
● ~ are available for many hardware and software platforms.
JDK VS JRE vs JVM
The JVM performs following main tasks:
● Loads code
● Verifies code
● Executes code
● Provides runtime environment
JDK VS JRE vs JVM
JRE
● ~is an acronym for Java Runtime Environment.
● ~ is used to provide runtime environment.
● ~ is the implementation of JVM.
● ~ physically exists.
● ~ contains set of libraries + other files that JVM uses at runtime.
● ~ released and maintained by Sun Micro
JDK VS JRE vs JVM
JDK
● ~is an acronym for Java Development Kit.
● ~physically exists.
● ~ It includes:
+ Java Runtime Environment (JRE),
+ an interpreter/loader (Java),
+ a compiler (javac),
+ an archiver (jar),
+ a documentation generator (Javadoc) and other tools needed in
Java development.
JDK VS JRE vs JVM
In Depth JRE (How does JRE works)
JRE consists of the following components:
● Deployment technologies:
○ deployment, Java Web Start and Java Plug-in.
● User interface toolkits:
○ AWT, Swing, Java 2D, Accessibility, Image I/O, Print Service and
more.
● Integration libraries:
○ JDBC, IDL, JNDI, RMI etc
● Other base libraries:
○ I/O, i18, Beans, Math, Networking etc.
In Depth JRE (How does JRE works)
● Lang and util base libraries:
○ lang and util, management, versioning, zip, instrument, reflection,
Collections, Concurrency Utilities, Java Archive (JAR), Logging,
Preferences API, Ref Objects and Regular Expressions.
● Java Virtual Machine (JVM):
○ including Java HotSpot Client and Server Virtual Machines.
Run time data areas
Run time data areas
Run time data areas
Run time data areas
JVM Run-Time Data Areas
JVM Run-Time Data Areas
Individual Thread :
● Not Shared
● created when a new thread is created
● include program counter register, JVM Stack, and Native Method Stack
○ is used to control each execution of each thread
○ contains frames, throws StackOverFlow error when stack get full
○ is used to support native methods
JVM Run-Time Data Areas
Frame: a frame is pushed to the stack when a method is invoked
JVM Run-Time Data Areas
Shared by All Threads
All threads share Heap and Method Area
● Heap:
○ most frequently deal with area.
○ It stores arrays and objects, created when JVM starts up.
○ Garbage Collection works in this area.
● Method Area:
○ stores run-time constant pool, field and method data, methods and
constructors code。 
●
JVM Run-Time Data Areas
Shared by All Threads
All threads share Heap and Method Area
● Runtime Constant Pool:
○ ~is a per-class or per-interface run-time representation of the
constant_pool table in a class file.
○ contains several kinds of constants, ranging from numeric literals known at
compile-time to method and field references that must be resolved at
run-time.
Heap Details
java -Xms=1M -XmX=2M "Class Name"
java -Xss=512M "Class Name"
Source:
https://www.linkedin.com/pulse/understanding-difference-between-jdk-jre-jvm-important-kumar/
https://www.geeksforgeeks.org/differences-jdk-jre-jvm/
https://dzone.com/articles/jvm-run-time-data-areas
https://www.hackerearth.com/practice/notes/runtime-data-areas-of-java/

More Related Content

PDF
Java Memory Descreption
PDF
Load testing in Zonky with Gatling
PPT
An Introduction to JVM Internals and Garbage Collection in Java
PDF
Debugging Your Production JVM
PDF
An End to Order (many cores with java, session two)
PDF
Reactive by example - at Reversim Summit 2015
PDF
ForkJoinPools and parallel streams
PDF
An End to Order
Java Memory Descreption
Load testing in Zonky with Gatling
An Introduction to JVM Internals and Garbage Collection in Java
Debugging Your Production JVM
An End to Order (many cores with java, session two)
Reactive by example - at Reversim Summit 2015
ForkJoinPools and parallel streams
An End to Order

What's hot (19)

PDF
Experiences with Evangelizing Java Within the Database
PDF
Whirlwind tour of the Runtime Dynamic Linker
PPTX
Java Release Model (on Scala Matsuri)
PDF
Slide smallfiles
PDF
Kernel Recipes 2014 - Performance Does Matter
PDF
Analyzing Java Applications Using Thermostat (Omair Majid)
PDF
KubeCon EU 2019 - P2P Docker Image Distribution in Hybrid Cloud Environment w...
PPTX
Whats New in Java 8
PDF
Ceph Day Chicago: Using Ceph for Large Hadron Collider Data
PDF
C# basics
PPT
Introduction to java programming
PDF
Reactive streams, because parallelism matters
PDF
Introduction of Java GC Tuning and Java Java Mission Control
PPTX
Introduction to Rust - Admios ALTalk Nov 2018
PPTX
DevNexus 2018: Learn Java 8, lambdas and functional programming
PPTX
Nd4 j slides.pptx
PPTX
Nd4 j slides
PDF
Mongodb meetup
PDF
BUD17-TR02: Upstreaming 101
Experiences with Evangelizing Java Within the Database
Whirlwind tour of the Runtime Dynamic Linker
Java Release Model (on Scala Matsuri)
Slide smallfiles
Kernel Recipes 2014 - Performance Does Matter
Analyzing Java Applications Using Thermostat (Omair Majid)
KubeCon EU 2019 - P2P Docker Image Distribution in Hybrid Cloud Environment w...
Whats New in Java 8
Ceph Day Chicago: Using Ceph for Large Hadron Collider Data
C# basics
Introduction to java programming
Reactive streams, because parallelism matters
Introduction of Java GC Tuning and Java Java Mission Control
Introduction to Rust - Admios ALTalk Nov 2018
DevNexus 2018: Learn Java 8, lambdas and functional programming
Nd4 j slides.pptx
Nd4 j slides
Mongodb meetup
BUD17-TR02: Upstreaming 101
Ad

Similar to Run time data areas (20)

PPTX
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
PPTX
JAVA_Day1_BasicIntroduction.pptx
PPTX
JAVAPart1_BasicIntroduction.pptx
PPTX
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
PPTX
Java -lec-1
PDF
An Introduction to Java Compiler and Runtime
PPTX
Object Oriented Programming Part 1 of Unit 1
PPTX
java intro.pptx
PPTX
Introduction of jvm|Java Training In Jaipur | Java Training Jaipur | Java Tra...
DOCX
Java JDK.docx
PPTX
1 java programming- introduction
PDF
A Brief study on JVM A Brief study on JVM
PPTX
Android Training Chandigarh
PPTX
Java virtual machine
PDF
Unit 1 Core Java for Compter Science 3rd
PPTX
Introduction to java
PPTX
2 22CA026_Advance Java Programming_Data types and Operators.pptx
PDF
Introduction java programming
PPT
Presentation on java
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
JAVA_Day1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptx
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
Java -lec-1
An Introduction to Java Compiler and Runtime
Object Oriented Programming Part 1 of Unit 1
java intro.pptx
Introduction of jvm|Java Training In Jaipur | Java Training Jaipur | Java Tra...
Java JDK.docx
1 java programming- introduction
A Brief study on JVM A Brief study on JVM
Android Training Chandigarh
Java virtual machine
Unit 1 Core Java for Compter Science 3rd
Introduction to java
2 22CA026_Advance Java Programming_Data types and Operators.pptx
Introduction java programming
Presentation on java
Ad

Recently uploaded (20)

PDF
KodekX | Application Modernization Development
PPT
Teaching material agriculture food technology
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
cuic standard and advanced reporting.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Cloud computing and distributed systems.
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
KodekX | Application Modernization Development
Teaching material agriculture food technology
Empathic Computing: Creating Shared Understanding
Digital-Transformation-Roadmap-for-Companies.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
The Rise and Fall of 3GPP – Time for a Sabbatical?
Building Integrated photovoltaic BIPV_UPV.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Spectral efficient network and resource selection model in 5G networks
Per capita expenditure prediction using model stacking based on satellite ima...
Big Data Technologies - Introduction.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Unlocking AI with Model Context Protocol (MCP)
cuic standard and advanced reporting.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Cloud computing and distributed systems.
Advanced methodologies resolving dimensionality complications for autism neur...

Run time data areas

  • 2. JDK VS JRE vs JVM Similarity JVM, JRE and JDK are platform dependent because configuration of each OS differs. But, Java is platform independent. JVM (Java Virtual Machine) ● ~ is an abstract machine ● ~ is a specification that provides runtime environment in which java bytecode can be executed. ● ~ are available for many hardware and software platforms.
  • 3. JDK VS JRE vs JVM The JVM performs following main tasks: ● Loads code ● Verifies code ● Executes code ● Provides runtime environment
  • 4. JDK VS JRE vs JVM JRE ● ~is an acronym for Java Runtime Environment. ● ~ is used to provide runtime environment. ● ~ is the implementation of JVM. ● ~ physically exists. ● ~ contains set of libraries + other files that JVM uses at runtime. ● ~ released and maintained by Sun Micro
  • 5. JDK VS JRE vs JVM JDK ● ~is an acronym for Java Development Kit. ● ~physically exists. ● ~ It includes: + Java Runtime Environment (JRE), + an interpreter/loader (Java), + a compiler (javac), + an archiver (jar), + a documentation generator (Javadoc) and other tools needed in Java development.
  • 6. JDK VS JRE vs JVM
  • 7. In Depth JRE (How does JRE works) JRE consists of the following components: ● Deployment technologies: ○ deployment, Java Web Start and Java Plug-in. ● User interface toolkits: ○ AWT, Swing, Java 2D, Accessibility, Image I/O, Print Service and more. ● Integration libraries: ○ JDBC, IDL, JNDI, RMI etc ● Other base libraries: ○ I/O, i18, Beans, Math, Networking etc.
  • 8. In Depth JRE (How does JRE works) ● Lang and util base libraries: ○ lang and util, management, versioning, zip, instrument, reflection, Collections, Concurrency Utilities, Java Archive (JAR), Logging, Preferences API, Ref Objects and Regular Expressions. ● Java Virtual Machine (JVM): ○ including Java HotSpot Client and Server Virtual Machines.
  • 14. JVM Run-Time Data Areas Individual Thread : ● Not Shared ● created when a new thread is created ● include program counter register, JVM Stack, and Native Method Stack ○ is used to control each execution of each thread ○ contains frames, throws StackOverFlow error when stack get full ○ is used to support native methods
  • 15. JVM Run-Time Data Areas Frame: a frame is pushed to the stack when a method is invoked
  • 16. JVM Run-Time Data Areas Shared by All Threads All threads share Heap and Method Area ● Heap: ○ most frequently deal with area. ○ It stores arrays and objects, created when JVM starts up. ○ Garbage Collection works in this area. ● Method Area: ○ stores run-time constant pool, field and method data, methods and constructors code。  ●
  • 17. JVM Run-Time Data Areas Shared by All Threads All threads share Heap and Method Area ● Runtime Constant Pool: ○ ~is a per-class or per-interface run-time representation of the constant_pool table in a class file. ○ contains several kinds of constants, ranging from numeric literals known at compile-time to method and field references that must be resolved at run-time.
  • 19. java -Xms=1M -XmX=2M "Class Name" java -Xss=512M "Class Name" Source: https://www.linkedin.com/pulse/understanding-difference-between-jdk-jre-jvm-important-kumar/ https://www.geeksforgeeks.org/differences-jdk-jre-jvm/ https://dzone.com/articles/jvm-run-time-data-areas https://www.hackerearth.com/practice/notes/runtime-data-areas-of-java/