A Java Virtual Machine (JVM) enables a set of computer software programs and data structures to use a virtual machine model for the execution of other.

Slides:



Advertisements
Similar presentations
1 Copyright © 2005, Oracle. All rights reserved. Introducing the Java and Oracle Platforms.
Advertisements

1 G54PRG Programming Lecture 1 Amadeo Ascó Adam Moore G54PRG Programming Lecture 1 Amadeo Ascó 3 Java Programming Language.
Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
Lab Information Security Using Java (Review) Lab#0 Omaima Al-Matrafi.
Lab#1 (14/3/1431h) Introduction To java programming cs425
Java.  Java is an object-oriented programming language.  Java is important to us because Android programming uses Java.  However, Java is much more.
Introduction to Java The objectives of this chapter are: To describe the key aspects of Java To describe the Java software development kit (SDK) To explain.
Java: History and Introduction (Lecture # 1). History… Java – Based on C and C++ – Developed in 1991 for intelligent consumer electronic devices – Green.
JVM-1 Introduction to Java Virtual Machine. JVM-2 Outline Java Language, Java Virtual Machine and Java Platform Organization of Java Virtual Machine Garbage.
For more Lectures and Notes Visit
Introduction to Java.
Java How to Program, 9/e Instructor: José M. Reyes Álamo © by Pearson Education, Inc. All Rights Reserved.
3-1 3 Compilers and interpreters  Compilers and other translators  Interpreters  Tombstone diagrams  Real vs virtual machines  Interpretive compilers.
Session-02. Objective In this session you will learn : What is Class Loader ? What is Byte Code Verifier? JIT & JAVA API Features of Java Java Environment.
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
01 Introduction to Java Technology. 2 Contents History of Java What is Java? Java Platforms Java Virtual Machine (JVM) Java Development Kit (JDK) Benefits.
LESSON 1 INTRODUCTION Compiled By: Edwin O. Okech [Tutor, Amoud University] JAVA PROGRAMMING.
Getting Started What is Java? A programming language –Fully buzzword-compliant: A simple, object oriented, distributed, interpreted, robust, secure,
Advanced OOP MCS-3 OOP BSCS-3 Lecture # 1
Introduction to Java Programming. Contents 1. Java, etc. 2. Java's Advantages 3. Java's Disadvantages 4. Types of Java Code 5. Java Bytecodes 6. Steps.
Intro to Java The Java Virtual Machine. What is the JVM  a software emulation of a hypothetical computing machine that runs Java bytecodes (Java compiler.
Embedded Java Research Geoffrey Beers Peter Jantz December 18, 2001.
Java Introduction 劉登榮 Deng-Rung Liu 87/7/15. Outline 4 History 4 Why Java? 4 Java Concept 4 Java in Real World 4 Language Overview 4 Java Performance!?
BASIC JAVA PROGRAMMING TUTORIAL. History  James Gosling and Sun Microsystems  Oak  Java, May 20, 1995, Sun World  Hot Java –The first Java-enabled.
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
Introduction to Java Kumar Harshit. Objectives ( 목적지 ) At the end of the lesson, the student should be able to: ● Describe the features of Java technology.
CMSC 202 Computer Science II for Majors Object-Oriented Programming.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Programming Languages Machine.
Java Virtual Machine Java Virtual Machine A Java Virtual Machine (JVM) is a set of computer software programs and data structures that use.
JIT in webkit. What’s JIT See time_compilation for more info. time_compilation.
Java Introduction Lecture 1. Java Powerful, object-oriented language Free SDK and many resources at
J2ME Presented by May Sayed & Menna Hawash. Outline Introduction “Java Technology” Introduction “What is J2ME?” J2ME Architecture J2ME Core Concepts 
Computer Programming A program is a set of instructions a computer follows in order to perform a task. solve a problem Collectively, these instructions.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
1.8History of Java Java –Based on C and C++ –Originally developed in early 1991 for intelligent consumer electronic devices Market did not develop, project.
INTRODUCTION TO JAVA AND ANDROID. Slide 2 Our Ecosystem Java Eclipse Android SDK.
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
Chapter 1: Introduction to Programs, and Java 1. Objectives To review programs (§ ). To understand the relationship between Java and the World Wide.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
Computer Programming 2 Why do we study Java….. Java is Simple It has none of the following: operator overloading, header files, pre- processor, pointer.
JAVA Programming “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
Java – in context Main Features From Sun Microsystems ‘White Paper’
ProgrammingLanguages Programming Languages The Twenty First Century This lesson introduces the programming languages of the 21 st century: Internet (Web)-
INTRODUCTION TO JAVA AND ANDROID. Slide 2 Our Ecosystem Java Eclipse Android SDK.
1 Introduction to Java. 2 * 10% Assignments/ class participation * 10% Pop Quizzes * 05% Attendance * 25% Mid Term * 50% Final Term.
Java How to Program, 9/e Presented by: José M. Reyes Álamo © by Pearson Education, Inc. All Rights Reserved.
1 Introduction Read D&D Sec 1.8; Sec 1.13 THE Java tutorial -
ITP 109 Week 2 Trina Gregory Introduction to Java.
Introduction to Programming 1 1 2Introduction to Java.
Introduction to JAVA Programming
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
Computer System Structures
Object Oriented Programming in
Before You Begin Nahla Abuel-ola /WIT.
Chapter 1 Introduction to Computers, Programs, and Java
Topic: Difference b/w JDK, JRE, JIT, JVM
Java programming lecture one
Introduction Enosis Learning.
Introduction Enosis Learning.
(Computer fundamental Lab)
Java History, Editions, Version Features
Introducing Java.
Outcome of the Lecture Upon completion of this lecture you will be able to understand Fundamentals and Characteristics of Java Language Basic Terminology.
Presentation transcript:

A Java Virtual Machine (JVM) enables a set of computer software programs and data structures to use a virtual machine model for the execution of other computer programs and scripts. The model used by a JVM accepts a form of computer intermediate language commonly referred to as Java bytecode.virtual machinescriptsintermediate languageJava bytecode

JVM, JRE, SDK,BYTECODE Smitha N Pai

A JVM can also implement programming languages other than Java. For example, Ada source code can be compiled to Java bytecode, which may then be executed by a JVM. JVMs can also be released by other companies besides Sun (the developer of Java) — JVMs using the "Java" trademark may be developed by other companies as long as they adhere to the JVM specification published by Sun and to related contractual obligationsAda

Java was conceived with the concept of WORA: "write once, run anywhere". This is done using the Java Virtual Machine. The JVM is the environment in which java programs execute. It is software that is implemented on non-virtual hardware and on standard operating systemswrite once, run anywhereoperating systems Programs intended to run on a JVM must be compiled into a standardized portable binary format, which typically comes in the form of.class files..class

The JVM, which is the instance of the 'JRE' (Java Runtime Environment), comes into action when a Java program is executed. When execution is complete, this instance is garbage collected. JIT is the part of the JVM that is used to speed up the execution time. JIT compiles parts of the bytecode that have similar functionality at the same time, and hence reduces the amount of time needed for compiling. garbage collected

The JVM verifies all bytecode before it is executed. This verification consists primarily of three types of checks: Branches are always to valid locations Data is always initialized and references are always type-safe Access to "private" or "package private" data and methods is rigidly controlled.

Code verification also ensures that arbitrary bit patterns cannot get used as an address. Memory protection is achieved without the need for a memory management unit (MMU). Memory protectionmemory management unit

A virtual machine (VM) is a software implementation of a programmable machine, where the software implementation is constrained within another computer at a higher or lower level of symbolic abstractionsoftwareprogrammable machine

Bytecode is a term which has been used to denote various forms of instruction sets designed for efficient execution by a software interpreter as well as being suitable for further compilation into machine codeinstruction sets interpretermachine code

The name bytecode stems from instruction sets which have one-byte opcodes followed by optional parameters. Intermediate representations such as bytecode may be output by programming language implementations to ease interpretation, or it may be used to reduce hardware and operating system dependence by allowing the same code to run on different platforms. Bytecode may often be either directly executed on a virtual machine (i.e. interpreter), or it may be further compiled into machine code for better performancebyteopcodesprogramming languageinterpretationoperating systemvirtual machine

A bytecode program may be executed by parsing and directly executing the instructions, one at a time. This kind of bytecode interpreter is very portable. Some systems, called dynamic translators, or "just-in-time" (JIT) compilers, translate bytecode into machine language as necessary at runtime: this makes the virtual machine unportable, but doesn't lose the portability of the bytecode itself.just-in-timeruntime

In computing, just-in-time compilation (JIT), also known as dynamic translation, is a method to improve the runtime performance of computer programscomputingcomputer programs

Interpreted code is translated from a high-level language to a machine code continuously during every execution, whereas statically compiled code is translated into machine code before execution, and only requires this translation once. JIT compilers represent a hybrid approach, with translation occurring continuously, as with interpreters, but with caching of translated code to minimize performance degradation. It also offers other advantages over statically compiled code at development time, such as handling of late-bound data types and the ability to enforce security guarantees.

In a bytecode-compiled system, source code is translated to an intermediate representation known as bytecode. Bytecode is not the machine code for any particular computer, and may be portable among computer architectures. The bytecode may then be interpreted by, or run on, a virtual machine. A just-in-time compiler can be used as a way to speed up execution of bytecode. At the time the bytecode is run, the just-in-time compiler will compile some or all of it to native machine code for better performance.source codebytecodevirtual machine

A common goal of using JIT techniques is to reach or surpass the performance of static compilation, while maintaining the advantages of bytecode interpretation: Much of the "heavy lifting" of parsing the original source code and performing basic optimization is often handled at compile time, prior to deployment: compilation from bytecode to machine code is much faster than compiling from source. The deployed bytecode is portable, unlike native code. Since the runtime has control over the compilation, like interpreted bytecode, it can run in a secure sandbox. Compilers from bytecode to machine code are easier to write, because the portable bytecode compiler has already done much of the work.

JDK = Java Development Kit - if you want to develop or just compile Java programs (*.java -> *.class -> *.jar) JRE = Java Runtime Environment - if you want to execute a Java program Just my simple descriptions: J2SE = Java 2 Standard Edition - (JDK+JRE) - for common purposes for example on PCs J2EE = Java 2 Enterprise Edition - AFAIK framework and methodology to produce applications in 3-layer technology (robust applications) J2ME = Java 2 Micro Edition - (JDK+JRE) - for small devices (cellular phones, palmtops etc.) SDK = Software Development Kit. It follows some fundamental infos from Sun's website: J2SE The premier solution for rapidly developing and deploying mission-critical, enterprise applications, J2SETM provides the essential compiler, tools, runtimes, and APIs for writing, deploying, and running applets and applications in the Java programming language.

J2EE J2EETM technology and its component based model simplifies enterprise development and deployment. The J2EE platform manages the infrastructure and supports the Web services to enable development of secure, robust and interoperable business applications. The J2EE platform is the foundation technology of the Sun ONE platform and Sun's Web services strategy J2ME A highly optimized Java runtime environment, J2METM technology specifically addresses the vast consumer space, which covers the range of extremely tiny commodities such as smart cards or a pager all the way up to the set-top box, an appliance almost as powerful as a computer.

1. A JRE software package is needed to use Java applications while a JDK software package is needed to create Java applications 2. A JDK software package contains everything in a JRE package along with the development tools 3. JREs are available for a much wider platform range compared to JDK 4. The JDK is meant for programmers and software developers while the JRE is for the common everyday user

1. An SDK is a set of development tools that allow applications to be created for certain software packages or platforms; the JDK is the most widely used SDK and is an extension of the SDK responsible for writing and running Java programs. 2. An SDK includes sample code and technical notes or other supporting documentation; the JDK includes components that are a selection of programming tools.

Java is a software platform that allows a unified code base for creating and deploying applications across a wide range of operating systems. Prior to Java, you would need to recompile, and even edit your code, in order to make it run on another operating system. With Java, you can write a program once, and be sure that it will run on a wide range of operating systems, provided there is a JVM, or Java Virtual Machine, that executes the Java application, and acts as a middle man between the application and the operating system. The JVM is packaged along with a collection of software, and referred to as a JRE, or Java Runtime Environment.need order The JRE not only contains the JVM, which is the most important software in the package, but extra software as well, that extends the functionalities of Java. This includes AWT, Swing, and a lot of other libraries that can be used by Java applications.JRE important

You can find a JRE for any operating system, including those for smartphones, like Windows Mobile and Google Android, and even standard mobile phones. There are different specifications for computers and mobile phones though, as they do not share the same hardware, and computer applications often do not run on mobile phonesGoogle

1. Java is a software platform, while JRE is a software package. 2. JRE contains the necessary software for running Java applications. running 3. Java is the same, regardless of the operating system, while the JRE differs.