Java Architecture
Java Architecture
Evolution of Java
Java Architecture
• Patrick Naughton
• Mike Sheridan
The origin of Java can be traced back to the fall of 1991, and was
initially called Greentalk later renamed to Oak.
Oak was renamed as Java in 1995
The goal was to move away from platform and OS-specific compilers
that would compile source for a particular target platform to a language
that would be portable, and platform-independent.
step2 Java
Bytecodes
Java Compiler move locally Java
Just in
Time
step5
or through Interpreter
Compiler Java
network
Virtual
machine
Runtime System
Java
Bytecode
(.class ) Operating System
Hardware
Step2:
Compile the source code using java compiler, which will create bytecode file with .class
extension
Step3:
Class loader reads both the user defined and library classes into the memory for execution
Step5:
JVM reads bytecodes and translates into machine code for execution. While execution of the
program the code will interact to the operating system and hardware
• Applications are run on user's machine, i.e. executed by interpreter with java command
(java Welcome)
Interpreting a Java program into byte code facilitates its execution in a wide variety of
environments
Once the Java runtime package exists for a given system, any Java program can run on it
The JVM will differ from platform to platform, and is, platform-specific
The use of bytecode enables the Java runtime system to execute programs much faster
It also keeps a tab on the code that is running and identifies only the heavily used areas
The JVM compiles these heavily used areas of code into native code
The rest of the code, which is not heavily used continues to be interpreted and executed
The class loader loads a compiled Java source file (.class files represented as bytecode) into
the Java Virtual Machine (JVM)
The bootstrap class loader is responsible for loading the classes, programmer defined classes
as well as Java's API classes
The class file is compiled to a target JVM, but independent of underlying host platforms
The Java class file is a binary file that has the capability to run on any platform
4. The JDK is a superset of the JRE, and contains everything that is in the JRE, plus
tools such as the compilers and debuggers necessary for developing applets and
applications.
A. TRUE
B. FALSE