Chapter 1: Introduction - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Chapter 1: Introduction

Description:

... led by Patrick Naughton, Mike Sheridan, and James Gosling (the Green Project) developed in early 1991 for intelligent consumer electronic devices ... – PowerPoint PPT presentation

Number of Views:19
Avg rating:3.0/5.0
Slides: 17
Provided by: jayrobertc
Category:

less

Transcript and Presenter's Notes

Title: Chapter 1: Introduction


1
Xavier University Computer Center Sun
Microsystems, Philippines
Java sa Eskwela (JsE) Program
2
Chapter 1
Introduction to Java
3
Chapter 1
  • Outline
  • History of Java
  • Java Class Libraries
  • Basics of a Typical Java Environment

4
Objectives
  • To become familiar with how Java evolved
  • To understand the Java program development
    environment

5
Introduction
  • Java
  • based on C and C
  • developed by a team led by Patrick Naughton, Mike
    Sheridan, and James Gosling (the Green Project)
  • developed in early 1991 for intelligent consumer
    electronic devices
  • Market did not develop, project in danger of
    being cancelled

6
Introduction
  • Java
  • Internet exploded in 1993, saved project
  • Used Java to create web pages with dynamic
    content
  • Java formally announced in 1995
  • Now used to create web pages with interactive
    content, enhance web servers, applications for
    consumer devices (pagers, cell phones)

7
Introduction
  • both compiled and interpreted language
  • vs. C/C source is refined to native
    instructions for a particular model of processor
  • compiled to universal format (byte-code) which is
    a set of instructions for a virtual machine

8
Introduction
  • Java Byte-code
  • compiled Java Source
  • also called J-code
  • executed by a Java run-time interpreter

9
Source Code Class temp ..
Java Runtime
Byte-code
PC
Mac
UNIX
10
Introduction
  • Java Programs
  • consist of pieces called classes
  • classes contain methods, which perform tasks
  • Class libraries
  • also known as Java API (Applications Programming
    Interface)
  • rich collection of predefined classes, which you
    can use

11
Introduction
  • Two parts to learning Java
  • Learning the language itself, so you can create
    your own classes
  • Learning how to use the existing classes in the
    libraries

12
Introduction
  • Five Phases
  • Edit
  • Use an editor to type Java program (e.g. vi or
    emacs, notepad, Jbuilder, JCreator)
  • .java extension
  • Compile
  • Translates program into byte-codes, understood by
    Java interpreter
  • javac command javac myProgram.java
  • Creates .class file, containing byte-codes
    (myProgram.class)

13
Introduction
  • Five Phases (continued)
  • Loading
  • class loader transfers .class file into memory
  • Applications run on user's machine
  • Applets loaded into Web browser, temporary
  • classes loaded and executed by interpreter with
    java command
  • java Welcome
  • HTML documents can refer to Java Applets, which
    are loaded into web browsers.

14
Introduction
  • Five Phases (continued)
  • Verify
  • Byte-code verifier makes sure byte-codes are
    valid and do not violate security
  • Java must be secure Java programs transferred
    over networks, possible to damage files (viruses)
  • Execute
  • computer (controlled by CPU) interprets program
    one byte-code at a time
  • performs actions specified in program

15
Introduction
Program is created in the editor and stored on
disk.
P1
Editor
Sec. Memory
Compiler creates byte-codes and stores them on
disk.
P2
Compiler
Class Loader
P3
Class loader puts byte-codes in memory.
Sec. Memory
Primary Memory
16
Introduction
P4
Verifier
Byte-code verifier confirms that all byte-codes
are valid and do not violate Javas security
restrictions.
Primary Memory
Interpreter reads bytecodes and translates them
into a language that the computer can
understand, possibly storing data values as
the program executes.
P5
Interpreter
Write a Comment
User Comments (0)
About PowerShow.com