Java: History and Introduction - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Java: History and Introduction

Description:

Java: History and Introduction – PowerPoint PPT presentation

Number of Views:157
Avg rating:3.0/5.0
Slides: 17
Provided by: waj6
Category:

less

Transcript and Presenter's Notes

Title: Java: History and Introduction


1
Java History and Introduction
  • (Lecture 1)

2
History
  • Java
  • Based on C and C
  • Developed in 1991 for intelligent consumer
    electronic devices
  • Green Project (According to Gosling, "the goal
    was ... to build a system that would let us do a
    large, distributed, heterogeneous network of
    consumer electronic devices all talking to each
    other." )
  • James Gosling Modified C
  • Named Oak then Java

3
History
  • Platform independent ("Write Once, Run Anywhere")
  • Interpreted Language
  • Intermediate Code (Byte Code)
  • Reliable
  • Multiple inheritance and Operator overloading
    removed
  • No Pointers because of security reasons

4
History
  • Internet exploded in 1993, saved project
  • Reliability
  • Security
  • Platform Independence
  • Java formally announced in 1995
  • Now used to create web pages with interactive
    content and applications for consumer devices
    (pagers, cell phones)...

5
Why Java??
6
Motivation ?
  • Simple
  • Pure Object Oriented Language
  • Allows Multi-threading
  • Automatic Garbage Collection
  • More Robust (Run time exceptions)
  • (Anyone heard of smart cards?)

7
Disadvantages ?
  • SpeedSlower than C
  • To the rescue
  • Just-in-time (JIT) compilation
  • Inability to access platform-specific code
  • To the rescue
  • Java Native Interface (JNI) (can also speed up
    code)

8
Difference Between C and Java
  • Java is C minus
  • Pointers
  • Destructors
  • Structs and unions
  • Templates
  • Multiple Inheritance
  • Operator Overloading

9
Types Of Java Programs
  • Applications Stand-alone java programs runnable
    from command prompt
  • Applets Run from inside a web browser or the
    appletviewer

10
Basics of a Typical Java Environment
  • Java Systems
  • Consist of environment, language, Java
    Applications Programming Interface (API)
  • Java programs have five phases
  • 1. Edit
  • .java extension
  • 2. Compile
  • javac command javac MyProgram.java
  • Creates .class file containing bytecodes

11
Basics of a Typical Java Environment
  • 3. Loading
  • Class loader transfers .class file into memory
  • Classes loaded and executed by interpreter with
    java command
  • To load,
  • appletviewer Welcome.html
  • Or java MyFile

12
Basics of a Typical Java Environment
  • 4. Verify
  • Bytecode verifier makes sure bytecodes are valid
    and do not violate security
  • 5. Execute
  • Computer interprets program one bytecode at a
    time
  • Performs actions specified in program

13
Program is created in the editor and stored on
disk.
Phase 1
Compiler creates bytecodes and stores them on
disk.
Phase 2
Primary Memory
Phase 3
Class loader puts bytecodes in memory.
Disk
Primary Memory
Phase 4
Bytecode verifier confirms that all bytecodes
are valid and do not violate Javas security
restrictions.
Primary Memory
Interpreter reads bytecodes and translates them
into machine language for that computer.
Phase 5

14
Java Virtual Machine (JVM)
  • Hypothetical computer that executes a Java
    program the interpreter
  • Each computer architecture (Intel x86, Macintosh,
    etc.) has its own JVM implemented in software
  • Sun Microsystems also has a JVM processor
    (hardware chip)
  • Web browsers have built-in interpreter

15
Intro to Some Java Technologies
  • Servlets Small server-side programs
  • JDBC Links Java programs to databases
  • RMI Helps build distributed applications
  • EJBs Reusable software components

16
Thank you!!
Write a Comment
User Comments (0)
About PowerShow.com