The document discusses the architecture of Java, which combines compilation and interpretation. It describes how Java code is first compiled into bytecode, then executed by the Java Virtual Machine (JVM), which interprets the bytecode and compiles it into machine code to be executed by the operating system. The main components of the Java architecture are the JVM, JRE, and JDK. The JVM provides an environment to execute Java programs and interprets bytecode into machine code so that Java programs can run on any system.
Java Architecturecombine the process of Compilation and Interpretation.
Compilation : A Compiler reads program in one-go and gives output if the program
is correct else an error.
Interpretation : It reads a program Line-by-Line.
Reading every expression gives output if the program is correct.
It gives error when it encounters the first mistake in any line of code.
3.
ARCHITECTURE
Source Code Compiler
JAVA
VIRTUAL
MACHINE
(JVM)
Bytecode
OPERATIG
SYSTEM (OS)
Java code converted into Byte code which is done by Java Compiler.
Byte code converted into Machine Code is done by JVM.
The machine code which is executed directly by Machine i.e., OS.
Development Tools: java, javac, jar, Javadoc
Library classes : Packages, Classes
lang util net Etc..
Stack
System
Math
Scanner Socket
URL
Packages
Classes
6.
JVM (JAVA VIRTUALMACHINE)
The JVM is a Java platform component that provides an environment
for executing Java programs.
JVM interprets the bytecode into machine code which is executed in
the machine in which the Java program runs.
Java Applications are called WORA (Write Once Run Anywhere).