Presentation is loading. Please wait.

Presentation is loading. Please wait.

 2003 Prentice Hall, Inc. All rights reserved. 1 Java Training Course Dr. H.E. Dunsmore Purdue University Java – How to Program, Deitel (5 th Edition)

Similar presentations


Presentation on theme: " 2003 Prentice Hall, Inc. All rights reserved. 1 Java Training Course Dr. H.E. Dunsmore Purdue University Java – How to Program, Deitel (5 th Edition)"— Presentation transcript:

1  2003 Prentice Hall, Inc. All rights reserved. 1 Java Training Course Dr. H.E. Dunsmore Purdue University Java – How to Program, Deitel (5 th Edition)

2  2003 Prentice Hall, Inc. All rights reserved. 2 Chapter 1 – Introduction to Computers, the Internet, and the Web Outline 1.8 History of Java 1.9 Java Class Libraries 1.13 Basics of a Typical Java Environment

3  2003 Prentice Hall, Inc. All rights reserved. 3 1.8 History of Java Java –1991, Sun Microsystems Project Green (“Oak”) –“Oak” became “Java” –Originally for intelligent consumer-electronic devices –Then used for creating Web pages with dynamic content –Now also used for: Developing large-scale enterprise applications Enhancing Web server functionality Providing applications for consumer devices (cell phones, etc.)

4  2003 Prentice Hall, Inc. All rights reserved. 4 1.9 Java Class Libraries Classes –Include methods that perform tasks Return information after task completion –Used to build Java programs Java contains class libraries –Known as Java APIs (Application Programming Interfaces) –Java finally has gotten us to the reality of “reusable code”

5  2003 Prentice Hall, Inc. All rights reserved. 5 1.13 Basics of a Typical Java Environment Java programs normally undergo five phases –Edit Programmer writes program (and stores program on disk) Java programs have.java extension Editor can be simple text editor or Integrated Development Environment (IDE) –Compile Compiler creates bytecode from program Bytecode can be understood by a Java interpreter (portability) Bytecode is in a file with a.class extension

6  2003 Prentice Hall, Inc. All rights reserved. 6 1.13 Basics of a Typical Java Environment Java programs normally undergo five phases… –Load Class loader stores bytecode in memory –Verify Verifier ensures bytecode does not violate security requirements Security because Java frequently comes from network –Execute Interpreter (Java Virtual Machine) translates bytecode into machine language Same process for both applications and applets

7  2003 Prentice Hall, Inc. All rights reserved. 7 Fig. 1.1 Typical Java environment. Primary Memory............ Disk Editor Compiler Class Loader Program is created in an editor and stored on disk in a file ending with.java. Compiler creates bytecodes and stores them on disk in a file ending with.class. Class loader reads.class files containing bytecodes from disk and puts those bytecodes in memory. Phase 1 Phase 2 Phase 3 Primary Memory............ Bytecode Verifier Bytecode verifier confirms that all bytecodes are valid and do not violate Java’s security restrictions. Phase 4 Primary Memory............ Interpreter Interpreter reads bytecodes and translates them into a language that the computer can understand, possibly storing data values as the program executes. Phase 5


Download ppt " 2003 Prentice Hall, Inc. All rights reserved. 1 Java Training Course Dr. H.E. Dunsmore Purdue University Java – How to Program, Deitel (5 th Edition)"

Similar presentations


Ads by Google