Java byte code presentation

MahnoorHashmi1 1,797 views 13 slides Jul 21, 2018
Slide 1
Slide 1 of 13
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13

About This Presentation

Complete presentation


Slide Content

Presentated By: Mahnoor Hashmi Subject: Java Programming Language

Presentation Java Byte code

What is Java ?? Java is a programming language originally developed by James Gosling at Sun Microsystems. The language drives much of its syntax from C and C++ but has a simpler object model. Java applications are typically compiled to byte code (class file) that can run on any Java Virtual Machine (JVM).

Java Byte Code Byte codes are the machine language of the java virtual machine. A feature that different the java with other programming features . It is a p rogramming code that, once compiled, is run through a virtual machine. Byte code  is the compiled format for  Java  programs . Once a  Java  program has been converted to  byte code , it can be transferred across a network and executed by  Java  Virtual Machine (JVM) .

Virtual Machine Before understanding what is JVM let us first know what is Virtual Machine . A virtual machine is a layer of abstraction that gives a program one simplified interface for interacting with a variety of physical computers and their operating systems.

Java Virtual Machine The  Java Virtual Machine  (JVM) is the runtime engine of the  Java  Platform, which allows any program written in  Java  or other language compiled into  Java  byte code to run on any computer that has a native JVM. The byte code can be executed on any platform where there exist JVM. It is available for many hardware and software platforms. JVM executes the step-by-step instructions given to it from the byte code.

z

JVM provides run time environment in which java byte code can be executed. When program compiles, the java compiler translates the java source code into a .class file (byte codes) that contains the compiled version of program. Byte codes are platform independent and proves Java is an independent language . JVM can run on different operating systems. Java Class File: Java class file is a file (with the .class extension) containing a Java byte code which can be executed on the Java Virtual Machine (JVM).

Components of JVM: Byte code verifier. Class loader. Execution engine. Garbage collector. Security manager.

Byte Code Verifier : Used to verify the byte code. Checks for unusual code. A crucial component for security.

Class loader: Loads java classes into JVM. All JVM include one class loader that is embedded in the virtual machine. The main feature of the class loader is that JVM. doesn’t need to have any knowledge about the classes that will be loaded at runtime. Execution Engine: Helps JVM to convert byte code into machine code using interpreter.

Garbage Collector: Process of automatically freeing objects that are no longer referenced by the program. Relieves java programmer from memory management. Security Manager: Monitors the code. A special java object responsible for guarding security policies for java applications.