2 Introduction to Java. Introduction to Programming 1 1



Similar documents
INTRODUCTION TO JAVA PROGRAMMING LANGUAGE

1. Overview of the Java Language

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

Java Programming. Binnur Kurt Istanbul Technical University Computer Engineering Department. Java Programming. Version 0.0.

Online Recruitment System 1. INTRODUCTION

Restraining Execution Environments

Mobile Application Languages XML, Java, J2ME and JavaCard Lesson 04 Java

An Overview of Java. overview-1

CSE 452: Programming Languages. Acknowledgements. Contents. Java and its Evolution

Java and Real Time Storage Applications

Contents. Java - An Introduction. Java Milestones. Java and its Evolution

12/22/11. } Android by Pearson Education, Inc. All Rights Reserved by Pearson Education, Inc. All Rights Reserved.

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

CS 209 Programming in Java #1

Java Garbage Collection Basics

Installing Java. Table of contents

02 B The Java Virtual Machine

picojava TM : A Hardware Implementation of the Java Virtual Machine

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

Characteristics of Java (Optional) Y. Daniel Liang Supplement for Introduction to Java Programming

Jonathan Worthington Scarborough Linux User Group

Java applets. SwIG Jing He

The Context of Software Development

System Structures. Services Interface Structure

Chapter 1 Fundamentals of Java Programming

CSC 551: Web Programming. Spring 2004

Java History. Java History (cont'd)

Embedded Software development Process and Tools: Lesson-3 Host and Target Machines

Habanero Extreme Scale Software Research Project

Module Title: Software Development A: Mobile Application Development

Hardware/Software Co-Design of a Java Virtual Machine

Lecture 1 Introduction to Android

A Thread Monitoring System for Multithreaded Java Programs

Programming Languages

The Hotspot Java Virtual Machine: Memory and Architecture

Checking Access to Protected Members in the Java Virtual Machine

Chapter 2 System Structures

Java in Education. Choosing appropriate tool for creating multimedia is the first step in multimedia design

JAVA Web Database Application Developer

How to Create an Android Application using Eclipse on Windows 7

Crash Course in Java

Security Issues of the Sandbox inside Java Virtual Machine (JVM) Mohammad Shouaib Hashemi

Embedded Software development Process and Tools:

Oracle Java SE and Oracle Java Embedded Products

Google Web Toolkit. Introduction to GWT Development. Ilkka Rinne & Sampo Savolainen / Spatineo Oy

Cloud Computing. Up until now

Fundamentals of Java Programming

Garbage Collection in the Java HotSpot Virtual Machine

Instrumentation Software Profiling

How To Use Java On An Ipa (Jspa) With A Microsoft Powerbook (Jempa) With An Ipad And A Microos 2.5 (Microos)

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

General Introduction

4. The Android System

Characterizing Java Virtual Machine for More Efficient Processor Power Management. Abstract

Mobile Application Development

Chapter 3: Operating-System Structures. Common System Components

What Perl Programmers Should Know About Java

Chapter 3 Operating-System Structures

Profiling and Testing with Test and Performance Tools Platform (TPTP)

Fahim Uddin 1. Java SDK

Chapter 1. Introduction to Computers, Programs, and Java

Lesson 06: Basics of Software Development (W02D2

Java and Java Virtual Machine Security

Chapter 1 Introduction to Computers, Programs, and Java

Chapter 13: Program Development and Programming Languages

Overview of CS 282 & Android

JPURE - A PURIFIED JAVA EXECUTION ENVIRONMENT FOR CONTROLLER NETWORKS 1

Android Programming and Security

Ch. 10 Software Development. (Computer Programming)

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program

An evaluation of the Java Card environment

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program

Introduction to Sun ONE Application Server 7

C# and Other Languages

Nokia 9210i/9290 Communicators and PersonalJava TM Application Development

Mobile application development J2ME U N I T I I

RE-TRUST Design Alternatives on JVM

C. Cross-Platform Java also presented a middleware threat to Microsoft s operating system monopoly

TIBCO Runtime Agent Authentication API User s Guide. Software Release November 2012

An Introduction to Android

JAVA 2 Network Security

For Introduction to Java Programming, 5E By Y. Daniel Liang

Virtual Machines. Virtual Machines

Antonio Kung, Trialog. HIJA technical coordinator. Scott Hansen, The Open Group. HIJA coordinator

24x7 Scheduler Multi-platform Edition 5.2

Advanced compiler construction. General course information. Teacher & assistant. Course goals. Evaluation. Grading scheme. Michel Schinz

Monitoring, Tracing, Debugging (Under Construction)

C Compiler Targeting the Java Virtual Machine

Upgrading Your Web Server from ClientBase Browser Version 2.0 or Above to Version 2.1.1

ABSTRACT. Keywords Virtual Reality, Java, JavaBeans, C++, CORBA 1. INTRODUCTION

DESIGN AND IMPLEMENTATION OF A FILE SHARING APPLICATION FOR ANDROID

Enterprise Java. Where, How, When (and When Not) to Apply Java in Client/Server Business Environments. Jeffrey Savit Sean Wilcox Bhuvana Jayaraman

Multi-core Programming System Overview

Chapter 12. Development Tools for Microcontroller Applications

System Architecture V3.2. Last Update: August 2015

CSCI E 98: Managed Environments for the Execution of Programs

Mobility Introduction Android. Duration 16 Working days Start Date 1 st Oct 2013

Java Platform, Micro Edition (Java ME) Mokoena F.R. The 7046 Team

Transcription:

2 Introduction to Java Introduction to Programming 1 1

Objectives At the end of the lesson, the student should be able to: Describe the features of Java technology such as the Java virtual machine, garbage collection and code security Describe the different phases of a Java program Introduction to Programming 1 2

Java Background: History Java was created in 1991 by James Gosling et al. of Sun Microsystems. Initially called Oak, in honor of the tree outside Gosling's window, its name was changed to Java because there was already a language called Oak. Introduction to Programming 1 3

Java Background: History Java The original motivation for Java The need for platform independent language that could be embedded in various consumer electronic products like toasters and refrigerators. One of the first projects developed using Java a personal hand-held remote control named Star 7. At about the same time, the World Wide Web and the Internet were gaining popularity. Gosling et. al. realized that Java could be used for Internet programming. Introduction to Programming 1 4

Java Background: What is Java Technology? The Java technology is: A programming language A development environment An application environment A deployment environment Introduction to Programming 1 5

Java Technology: Programming Language As a programming language, Java can create all kinds of applications that you could create using any conventional programming language. Introduction to Programming 1 6

Java Technology: A Development Environment As a development environment, Java technology provides you with a large suite of tools: A compiler (javac) An interpreter (java) A documentation generator (javadoc) A class file packaging tool and so on... Introduction to Programming 1 7

Java Technology: An Application and Runtime Environment Java technology applications are typically general-purpose programs that run on any machine where the Java runtime environment (JRE) is installed. There are two main deployment environments: 1. The JRE supplied by the Java 2 Software Development Kit (SDK) contains the complete set of class files for all the Java technology packages, which includes basic language classes, GUI component classes, and so on. 2. The other main deployment environment is on your web browser. Most commercial browsers supply a Java technology interpreter and runtime environment. Introduction to Programming 1 8

Java Features Some features of Java: The Java Virtual Machine Garbage Collection Code Security Introduction to Programming 1 9

Java Features: The Java Virtual Machine Java Virtual Machine (JVM) an imaginary machine that is implemented by emulating software on a real machine provides the hardware platform specifications to which you compile all Java technology code Bytecode a special machine language that can be understood by the Java Virtual Machine (JVM) independent of any particular computer hardware, so any computer with a Java interpreter can execute the compiled Java program, no matter what type of computer the program was compiled on Introduction to Programming 1 10

Java Features: Garbage Collection Garbage collection thread responsible for freeing any memory that can be freed. This happens automatically during the lifetime of the Java program. programmer is freed from the burden of having to deallocate that memory themselves Introduction to Programming 1 11

Java Features: Code Security Code security is attained in Java through the implementation of its Java Runtime Environment (JRE). JRE runs code compiled for a JVM and performs class loading (through the class loader), code verification (through the bytecode verifier) and finally code execution Introduction to Programming 1 12

Java Features: Code Security Class Loader responsible for loading all classes needed for the Java program adds security by separating the namespaces for the classes of the local file system from those that are imported from network sources After loading all the classes, the memory layout of the executable is then determined. This adds protection against unauthorized access to restricted areas of the code since the memory layout is determined during runtime Introduction to Programming 1 13

Java Features: Code Security Bytecode verifier tests the format of the code fragments and checks the code fragments for illegal code that can violate access rights to objects Introduction to Programming 1 14

Phases of a Java Program The following figure describes the process of compiling and executing a Java program Introduction to Programming 1 15

Phases of a Java Program Introduction to Programming 1 16

Summary Java Background History Java Technology A programming language, development environment, application environment and deployment environment Java Features Java Virtual machine, garbage collection and code security Phases of a Java Program Write, compile, run Introduction to Programming 1 17