What is Java Platform?

Similar documents
From High Level to Machine Code. Compilation Overview. Computer Programs

Introduction to Java Programming

An Introduc+on to Computers and Java CSC 121 Spring 2017 Howard Rosenthal

Chapter 1 Introduction to Computers, Programs, and Java

Programming: detailed instructions which tell the computer hardware what to do aka software Computer Science: the study NOT of computers, but of what

An Introduction to Computers and Java CSC 121 Spring 2015 Howard Rosenthal

The Programming Process Summer 2010 Margaret Reid-Miller

Chapter 1 Introduction to Computers, Programs, and Java

Computer Basics 1/6/16. Computer Organization. Computer systems consist of hardware and software.

Computational Applications in Nuclear Astrophysics using Java Java course Lecture 1

Chapter 1 Introduction to Computers, Programs, and Java. What is a Computer? A Bit of History

Chapter 1: Introduction to Computers and Java

8/23/2014. Chapter Topics. Introduction. Java History. Why Program? Java Applications and Applets. Chapter 1: Introduction to Computers and Java

Introduction to Java. Lecture 1 COP 3252 Summer May 16, 2017

Elements of Computers and Programming Dr. William C. Bulko. What is a Computer?

Certified Core Java Developer VS-1036

Computer Basics 1/24/13. Computer Organization. Computer systems consist of hardware and software.

Chapter 1. Introduction to Computers and Programming. M hiwa ahmad aziz

Chapter. Focus of the Course. Object-Oriented Software Development. program design, implementation, and testing

Chapter 11 Program Development and Programming Languages

COMP Computer Basics. Yi Hong May 13, 2015

! Learn how to think like a computer scientist. ! Learn problem solving. ! Read and write code. ! Understand object oriented programming

Topics. Hardware and Software. Introduction. Main Memory. The CPU 9/21/2014. Introduction to Computers and Programming

CHAPTER 1 Introduction to Computers and Java

Computer Principles and Components 1

Microprocessors and Microcontrollers Prof. Santanu Chattopadhyay Department of E & EC Engineering Indian Institute of Technology, Kharagpur

1. Boolean algebra. [6] 2. Constructing a circuit. [4] 3. Number representation [4] 4. Adders [4] 5. ALU [2] 6. Software [4]

CISC 124: Introduction To Computing Science II

Advanced Object-Oriented Programming Introduction to OOP and Java

Introduction to Computers and Programming Languages. CS 180 Sunil Prabhakar Department of Computer Science Purdue University

IT151: Introduction to Programming (java)

Computer Programming-1 CSC 111. Chapter 1 : Introduction

Using Eclipse for Java. Using Eclipse for Java 1 / 1

2 Introduction to Java. Introduction to Programming 1 1

Chapter 1 Introduction to Computers, Programs, and Java

Getting Started. Chapter 1. Java Programming FROM THE BEGINNING. Chapter 1: Getting Started

1. Introduction. Java. Fall 2009 Instructor: Dr. Masoud Yaghini

C H A P T E R 1. Introduction to Computers and Programming

Chapter 2: Operating-System Structures

COPYRIGHTED MATERIAL. What Is Assembly Language? Processor Instructions

Introduction. Introduction to OOP with Java. Lecture 01: Introduction to OOP with Java - AKF Sep AbuKhleiF -

Test Bank for Prelude to Programming Chapter 0

Computers in Engineering COMP 208. Computer Structure. Computer Architecture. Computer Structure Michael A. Hawker

OPERATING SYSTEMS. Prescribed Text Book Operating System Principles, Seventh Edition By Abraham Silberschatz, Peter Baer Galvin and Greg Gagne

9/11/08 (c) 2008 Matthew J. Rutherford Class (c) 2008 Matthew J. Rutherford Class

Introduction to OOP with Java. Instructor: AbuKhleif, Mohammad Noor Sep 2017

Introduction to Computers. Joslyn A. Smith

Parrot is a virtual machine designed to efficiently compile and execute bytecode for interpreted languages.

Tutorial 1 CSC 201. Java Programming Concepts عؾادئماظربجمةمبادؿكدامماجلاصا

The Computer System. Hardware = Physical Computer. Software = Computer Programs. People = End Users & Programmers. people

Intermediate Programming & Design (C++) Notation

Software Concepts. It is a translator that converts high level language to machine level language.

II. Compiling and launching from Command-Line, IDE A simple JAVA program

How to Install Oracle VM VirtualBox and Create a Virtual Machine

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG)

A computer is an electronic device, operating under the control of instructions stored in its own memory unit.

What is UNIX? A Little Bit about UNIX and User Interfaces. Adapted from Practical Unix and Programming Hunter College

lejos NXJ Problem Solving with Robots [PRSOCO601]

Chapter 1 Introduction to Computers, Programs, and Java

Chapter 1: Introduction to Computers, Programs, and Java

COMP163. Introduction to Computer Programming. Introduction and Overview of the Hardware

Lecture 1: Introduction to Java

Lecture 5: February 3

Introduction to Java. Nihar Ranjan Roy.

Coding & Computation or What s all this about 1s and 0s? File: coding-computation-slides.tex.

Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

CS260 Intro to Java & Android 02.Java Technology

Introduction to Computers and Java

Chapter 1. Introduction to Computers and Java Objects. Background information. » important regardless of programming language. Introduction to Java

assembler Machine Code Object Files linker Executable File

JVM interprets the Java bytecode, controls how it interacts with the operating system and manages memory.

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

Chapter 8 Operating Systems and Utility Programs أ.أمل زهران

(Refer Slide Time 00:01:09)

Chapter 8 Operating Systems and Utility Programs

Cost of Your Programs

Chapter 5 C. Virtual machines

User Guide. Android x86 Modified System. Sponsor: Huan Ren. Compiled by: Zachary Bair, Taronish Daruwalla, Joshua Duong, and Anthony Nguyen

Operating Systems CS3502 Spring 2018

Computer Organization & Assembly Language Programming (CSE 2312)

Programming 1. Lecture 1 COP 3014 Fall August 28, 2017

Last Time. University of British Columbia CPSC 111, Intro to Computation Alan J. Hu. Readings

USING A FREE VIRTUAL MACHINE TO SIMILATE A SPECIFIC MODEL OF COMPUTER

Java and Software Design

What is a VM? Categories of Virtual Machines. Process Virtual Machine 11/17/2010

Game keystrokes or Calculates how fast and moves a cartoon Joystick movements how far to move a cartoon figure on screen figure on screen

Chapter 101. Coding & Computation. Coding & Computation or What s all this about 1s and 0s? Topics

CMSC131. Hardware and Software. Hardware

CMSC131. Hardware and Software

Operating Systems Lab 1. Class topic: Installation of the operating system. Install Ubuntu on Oracle VirtualBox

Notes of the course - Advanced Programming. Barbara Russo

Introduction to Computers and Java. Objectives. Outline. Harald Gall, Prof. Dr. Institut für Informatik Universität Zürich.

Introduction to Computers and Java

CHAPTER 16 - VIRTUAL MACHINES

Android PC Splash Brothers Design Specifications

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG

Introduction to Computers and Java

C++ Spring Break Packet 11 The Java Programming Language

Introduction to Computers and Java. Objectives. Outline. Harald Gall, Prof. Dr. Institut für Informatik Universität Zürich.

Programming 1 - Honors

Transcription:

What is Java Platform? Java is a programming language and a computing platform for application development. It was first released by Sun Microsystem in 1995 and later acquired by Oracle Corporation. A Java platform includes an execution engine, a compiler and a set of libraries. Java is not specific to any processor or operating system. Like C compiler, Java compiler does not produce native executable code for a particular machine. Instead, Java produces a unique format called bytecode. It executes according to the rules laid out in the virtual machine specification. This video introduces the Java platform, and explains why Java is a platform as well a programming language. To understand JAVA programming language, we need to understand some basic concept of how a computer program can run a command and execute the action. "Java is a programming language as well as a Platform" How about recollecting some basic concept of computing? What is PC? A computer is an electronic device capable of performing computations, and we all know that it composed of a monitor, keyboard, mouse and memory to store information. But the most important component of the computer is a PROCESSOR. Which does all thinking of computer, but the question is how the computer does this thinking? How does it understand text, images, videos, etc.?

The computer is an electronic device, and it can only understand electronic signals or binary signals. For example, the 5-volt electronic signal may represent binary number 1 while 0 volts may represent binary number 0. So your PC is continuously bombarded with these signals. Eight bits of such signals are group together to interpret Text, numerical and symbols.

For example, the # symbol is identified by computer by 10101010. Similarly, the pattern for adding a function is represented by 10000011.

This is known as 8-bit computing. Current day processor is capable of decoding 64 bit time. But what is the relation of this concept with the programming language JAVA. Let understand these with an example. Suppose if you want to tell the computer to add two number (1+2) which is represented by some binary numbers (10000011), how are you going to tell the computer? Yes, we going to use assembly language to get our code executed. "Assembly Language is the most elementary form of software development languages." We are going to give the command to a computer in this format as shown below. Your code to add two numbers in this language would be in this order. Store number 1 at memory location say A Store number 2 at memory location say B Add contents of Location A & B Store results But how are we going to do this? Back in 1950's when computers were huge and consumed great deal of power, you would convert your assembly code into corresponding machine code to 1 and 0's using mapping sheets. Later these code will be punched into the machine cards and feed to the computer. The computer will read these code and execute the program. These would be a long process then until ASSEMBLER came to help.

What are Assembler and Compiler? With the advancement in technology i/o devices were invented you could directly type your program into the PC using a program called ASSEMBLER. It converts it into corresponding machine code (110001..) and feed to your processor. So coming back to our example addition of (1+2), the assembler will convert this code into machine code and give the output. That apart, you will also have to make calls to create Operating System provided functions to display the output of the code. But alone assembler is not involved in this whole process, it also requires the compiler to compile the long code into a small chunk of codes. With advancement in software development languages, this entire assembly code could shrink into just one line print f 1+2 A with the help of software called COMPILER. It is used to convert your c language code into assembly code, and the assembler converts it into corresponding machine code, and this machine code will be transmitted to the processor. The most common processor used in PC or Computers are Intel processor. Though present day compilers come bundled with assembler can directly convert your higher language code into machine code. Now, suppose Windows operating system is running on this Intel processor, a combination of Operating System plus the processor is called the PLATFORM. The most common platform in the world is the Windows and Intel called the Wintel Platform. The other popular platforms are AMD and Linux, Power PC, and Mac OS X.

Now, with a change in processor, the assembly instructions will also change. For example the Add instruction in Intel may be called ADDITION for AMD OR Math ADD for Power PC And obviously with a change in Operating System, the level and nature of O.S level calls will also change. As a developer, I want my software program to work on all platforms available, to maximize my revenues. So I would have to buy separate compilers which convert my print f command into the native machine code. But compilers come expensive, and there is a chance of compatibility issues. So buying and installing a separate compiler for different O.S and processor is not feasible. So, what can be an alternative solution? Enter Java language. By using Java Virtual Machine, these problem can be solved. But how it works on different processors and O.S. Let's understand this process step by step.

Step 1) The code to display addition of two numbers is System.out.println(1+2), and saved as.java file Step 2) Using the java compiler the code is converted into an intermediate code called the bytecode. The output is a.class file. Step 3) This code is not understood by any platform, but only a virtual platform called the Java Virtual Machine Step 4) This Virtual Machine resides in the RAM of your operating system. When the Virtual Machine is fed with this bytecode, it identifies the platform it is working on and converts the bytecode into the native machine code

In fact, while working on your PC or browsing the web whenever you see either of these icons be assured the java virtual machine is loaded in your RAM. But what makes java lucrative is that code once compiled can run not only on all PC platforms but also mobiles or other electronic gadgets supporting java Hence, java is a language as well as a platform (JVM)