Section 1.4. Java s Magic: Bytecode, Java Virtual Machine, JIT,



Similar documents
Introduction to Virtual Machines

Zulu by Azul OpenJDK for Azure

What s Cool in the SAP JVM (CON3243)

INTRODUCTION TO JAVA PROGRAMMING LANGUAGE

Virtual Machines. Virtual Machines

Restraining Execution Environments

System Requirements. SAS Profitability Management Deployment

System Structures. Services Interface Structure

Oracle Java SE and Oracle Java Embedded Products

9/11/15. What is Programming? CSCI 209: Software Development. Discussion: What Is Good Software? Characteristics of Good Software?

Instrumentation Software Profiling

Fahim Uddin 1. Java SDK

Outside In Image Export Technology SDK Quick Start Guide

Contents. Primavera P6 Tested Configurations Release Version: Date: December 2013 Revision:

System Requirements and Platform Support Guide

Data Sheet VISUAL COBOL WHAT S NEW? COBOL JVM. Java Application Servers. Web Tools Platform PERFORMANCE. Web Services and JSP Tutorials

Contents. BMC Atrium Core Compatibility Matrix

Eclipse installation, configuration and operation

Adobe LiveCycle ES Update 1 System Requirements Adobe LiveCycle ES Foundation-based solution components

<Insert Picture Here> Oracle Policy Automation System Requirements

Microsoft Windows Apple Mac OS X

This document lists the configurations that have been tested for the Oracle Primavera P6 version 7.0 release.

Building Applications Using Micro Focus COBOL

Application Servers - BEA WebLogic. Installing the Application Server

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

Procase Consulting. APEX 4.1 Introduction. Oleg Mochkin

24x7 Scheduler Multi-platform Edition 5.2

StreamServe Persuasion SP5 Supported platforms and software

Connect Here. Go Anywhere.

Microsoft Windows Apple Mac OS X

Virtualization and Other Tricks.

System Requirements. SAS Profitability Management 2.2. Deployment

Virtual Machines. Adapted from J.S. Smith and R. Nair, VIRTUAL MACHINES, Morgan-Kaufmann Teodor Rus.

SAP NetWeaver 7.4 Planning Product Availability Matrix (Planning PAM)

General Introduction

<Insert Picture Here> Oracle Policy Automation System Requirements

Price List. Phone Number (919) Address Mailing Address PO Box 698 Franklinton NC 27525

C# and Other Languages

IBM Software Group. SW5706 JVM Tools IBM Corporation 4.0. This presentation will act as an introduction to JVM tools.

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1

Supported Platforms. HP Vertica Analytic Database. Software Version: 7.1.x

1. Overview of the Java Language

Readme File for All Platforms

CA Identity Manager. Installation Guide (WebLogic) r12.5 SP8

Some Future Challenges of Binary Translation. Kemal Ebcioglu IBM T.J. Watson Research Center

How To Understand And Understand The Basic Principles Of An Ansper System

Web Development Kit Applications Language Pack Installation and Release Notes

SNOW LICENSE MANAGER (7.X)... 3

Oracle Business Intelligence Publisher. 1 Oracle Business Intelligence Publisher Certification. Certification Information 10g Release 3 (

The Internet Server. Hong Q. Bui Chris Zuleeg

Supported Platforms HPE Vertica Analytic Database. Software Version: 7.2.x

IBM Enterprise Content Management Software Requirements

Symantec NetBackup Enterprise Server and Server 7.x OS Software Compatibility List

HP Service Manager Compatibility Matrix

Software: Systems and Application Software

Foglight. Managing Java EE Systems Supported Platforms and Servers Guide

Supported Platforms. HP Vertica Analytic Database. Software Version: 7.0.x

Sample copy. Introduction To WebLogic Server Property of Web 10.3 Age Solutions Inc.

2 Introduction to Java. Introduction to Programming 1 1

Java Garbage Collection Basics

Example of Standard API

Crystal Reports XI Release 2 for Windows Service Pack 3

Programming Languages

Kernel Types System Calls. Operating Systems. Autumn 2013 CS4023

ServletExec TM 6.0 Installation Guide. for Microsoft Internet Information Server SunONE Web Server Sun Java System Web Server and Apache HTTP Server

<Insert Picture Here> Oracle Database Support for Server Virtualization Updated December 7, 2009

TIBCO iprocess Web Services Server Plug-in Installation. Software Release October 2011

Xcelsius Dashboards on SAP NetWaver BW Implementation Best Practices

IBM WebSphere Business Integration for HIPAA

Virtualization and the U2 Databases

Overview. The Android operating system is like a cake consisting of various layers.

IBM Tivoli Monitoring for Databases

Contents. BMC Remedy AR System Compatibility Matrix

The operating system requirements listed in this document include the most current patches and service packs.

Release Notes for Open Grid Scheduler/Grid Engine. Version: Grid Engine

Operating System Compiler Bits Part Number CNL 6.0 AMD Opteron (x86-64) Windows XP x64 Intel C Microsoft Platform SDK 64 P10312

EMC Information Protection Software Compatibility Guide - Last Updated: June 30, 2008

Tested configuration for Major versions of Primavera:-

PN Connect:Enterprise Secure FTP Client Release Notes Version

Analysis of Virtualization Tools and Techniques

ArcSDE Oracle Database Requirements

vrealize Hyperic Supported Configurations and System Requirements

An Oracle White Paper October Frequently Asked Questions for Oracle Forms 11g

12. Introduction to Virtual Machines

Fachbereich Informatik und Elektrotechnik SunSPOT. Ubiquitous Computing. Ubiquitous Computing, Helmut Dispert

Cost Savings through Desktop Virtualization

Installing Primavera P6 Professional R8.2

Sviluppo soluzioni Open Source per il Cloud

01. Introduction of Android

Anh Quach, Matthew Rajman, Bienvenido Rodriguez, Brian Rodriguez, Michael Roefs, Ahmed Shaikh

Symantec NetBackup Getting Started Guide. Release 7.1

HULFT7e for i5os(ver.7.3.0) Effective on 3 Apr HULFT7e for UNIX-M(Ver.7.3.0) HULFT7e for UNIX-L(Ver.7.3.0) Effective on 3 Apr.

System requirements. Java SE Runtime Environment(JRE) 7 (32bit) Java SE Runtime Environment(JRE) 6 (64bit) Java SE Runtime Environment(JRE) 7 (64bit)

Operating System Structures

Reminders. Lab opens from today. Many students want to use the extra I/O pins on

PROGRESS DATADIRECT QA AND PERFORMANCE TESTING EXTENSIVE TESTING ENSURES DATA CONNECTIVITY THAT WORKS

SequeLink Server for ODBC Socket

The Hotspot Java Virtual Machine: Memory and Architecture

Azul's Zulu JVM could prove an awkward challenge to Oracle's Java ambitions

Transcription:

J A V A T U T O R I A L S : Section 1.4. Java s Magic: Bytecode, Java Virtual Machine, JIT, JRE and JDK This section clearly explains the Java s revolutionary features in the programming world. Java basic terminology and concept is explained in this section. WWW.J4SCHOOL.COM

Java s Magic: Bytecode, Java Virtual Machine, Objective: JIT, JRE and JDK This section clearly explains the Java s revolutionary features in the programming world. Java basic terminology and concept is explained in this section. Overview: Lets say, if Java is a human speaking Spanish language and we ask a person who does not speak Spanish to read this language. It would be impossible for him to read, write or understand this language because he cannot speak this language. In order to make this language understandable to any person we need a interpreter who helps to interpret this Spanish language into that person understandable language. Similarly, to make a programming language understandable to any platform, device or operating system there is a need for such interpreter which can interpret the developers code into machine specific instructions. Unlike, C and C++ which generated the compiled code into machine specific instructions made the program impossible for various platform to understand or execute. The key advantages of Java programming language is that the compiled code of java is not machine specific instructions but rather an intermediate code called as ByteCode. 1

Bytecode is the code generated after the Java programs are compiled. This is the intermediate representations of Java programs. Bytecode is NOT executable code like.exe but this is java propriety intermediate code. Bytecode is NOT machine understandable language. Bytecode is a highly optimized set of instructions designed to be executed by the Java runtime system (interpreter) which is called the Java Virtual Machine (JVM). This provides greater level of flexibility for the developers to implement the logic specific to JVM rather to any platform or device. Job of JVM is to read this bytecode and convert into machine dependent instructions. So, JVM s needs to be platform specific but not the developers code. JVM is an interpreter for Bytecode So, for any system to support java programs it is mandatory that JVM needs to be preinstalled on that machine. With every new device or platform in the market, Oracle provide JVM release which open the way for java programs to execute on that device. JVM implementation will differ from platform to platform but all interpret the same bytecode. This key concept makes the java program secure as the bytecode must be executed under the control of JVM and the implementation of JVM is done by the product team. This way JVM does not allow any security breach to happen from the java programs and can monitor the illegal behavior of the programs. 2

ByteCode Platform Independent Bytecode generated after compiling in Mac, Windows, Linux or Unix will be same which makes Bytecode platform independent. So, Bytecode compiled in one platform can be executed into another platform. Java Virtual Machine (JVM) Definition: The Java Virtual Machine (JVM) is an abstract computer, on which the byte code can be executed. Or Java Virtual Machine (JVM) interprets the byte code into the machine code depending upon the underlying operating system and hardware combination. JVM does not know anything about Java program rather it reads the bytecode, interprets the code and executes the code. 3

Bytecode Platform Independent vs Java Virtual Machine (JVM) Platform Dependent: JVM is platform dependent that means there are different implementation of JVM on different OS. Java code / Bytecode is always the same on different OS.That makes java program as platform independent. JVM Implementation: JVM is platform dependent that means there are different implementation of JVM on different OS. Type of JVM implementations: The primary reference Java VM implementation is HotSpot, produced by Oracle Corporation. Other list of JVM for various O/S and hardware: Hewlett-Packard, Java for HP-UX, OpenVMS, Tru64 and Reliant (Tandem) UNIX platforms J9 (IBM), for AIX, Linux, MVS, OS/400, Pocket PC, z/os JBlend, (Aplix) is a Java ME implementation JRockit (originally from Appeal Virtual Machines) acquired by Oracle for Linux, Windows and Solaris Mac OS Runtime for Java (MRJ) Microsoft Java Virtual Machine (discontinued in 2001) 4

SAPJVM (SAP) is a licensed and modified SUN JVM ported to all supported platforms of SAP NetWeaver, started as Java 5, in the meantime Java 6 compatible (Windows i386, x64, IA-64; Linux x86, IA-64, PowerPC; AIX PowerPC; HP-UX SPARC IA-64; Solaris SPARC x86-64; i5/os PowerPC) Java s Magic Just In Time (JIT): Just in time (JIT) is a part of Java Virtual Machine (JVM) architecture. The job of JIT inside JVM is to compile bytecode into machine executable code in real time, on a piece-by-piece, demand basis. When Java programs are executed, JVM does not read the entire Bytecode and converts it into machine instructions. If JVM tries to do this approach then the program execution time will be delayed for hours. Java has overcome the latency of program execution time by interpreting the required bytecode and keep the rest of the code aside. Just in time (JIT) helps to compile code that is only needed and at the same time boost the program performance. Whether the Java programs are interpreted traditional way or on the fly the functionality and features like portability and security remains the same. Summary: Java compiler converts the Java source code that you write into a binary program consisting of bytecodes. Bytecodes are machine instructions for the Java Virtual Machine. 5

When you execute a Java program, a program called the Java interpreter (JIT) inspects and deciphers the bytecodes into machine executable language. Java s Magic Java Runtime Environment (JRE): As we discussed above, Java programs cannot be executed on machine without the JVM installed on machine. Java Runtime Environment (JRE) is a software which we can download and install on the any operating system like Windows, Mac or Linux. JRE is combination of JVM and Java Application Programming Interface (Java API). Java API are set of tools and libraries that is required by the JVM to execute the java programs. Thus, Java Runtime Environment provides an environment to execute java programs on the computer. JRE = JVM + Java API s (like util, math, lang, awt, swing etc) + Runtime libraries. JRE does NOT contain any development tools such as compiler, debugger, etc. and it is NOT for development purpose. 6

Java s Magic Java Development Kit (JDK): Java Development Kit (JDK) is a set of development tools installed on the local machine to write and compile Java programs. JDK = JRE + Java Development Tools + Libraries Java Folder structure and usage: 7

Summarize: Java programs are written in.java file. Bytecode: Bytecode is the code generated after the java program is compiled. Java Virtual Machine (JVM): This is virtual machine which reads the bytecode and interprets into machine code depending upon the underlying operating system and hardware combination. Just In Time (JIT): Just in time compiler is part of the Java Virtual Machine (JVM) and it compiles bytecode into executable code in real time, on a piece-by-piece, demand basis. Java Runtime Environment (JRE): Java Runtime Environment provides an environment to execute java programs on the computer. Java Development Kit (JDK): Java development Kit is the development tools and libraries that are required to develop java programs. Java Compiler: This is the compiler tool that compiles and convert the.java code into.class bytecode. Java Interpreter: The job of interpreter is to read the bytecode and convert into machine dependent instructions to execute. 8