Introduction to Java

Reviews
Shared by: StuartSpruce
Stats
views:
181
rating:
not rated
reviews:
0
posted:
6/24/2009
language:
English
pages:
0
Introduction to Java < nu m 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 ●  ●  < nu m Changes in Computing ●  Computer science is only about 60 years old –  –  Java was first introduced in 1994 We will be covering Java features that didn’t exist a couple of years ago ●  Change is rapid and accelerating –  –  –  –  –  –  Dominant language of the 1990s: C++ Dominant language of early 2000s: Java Dominant company: IBM to Microsoft to ? (Google) First GUI: Macintosh, 1984 ν First web browser: Mosaic, 1992 Web pages: HTML to DHTML to XML < nu m 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. –  –  < nu m 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. < nu m Java Background: What is Java Technology? ●  The Java technology is: –  A programming language A development environment An application environment A deployment environment –  –  –  < nu m Java Technology: Programming Language ●  As a programming language, Java can create all kinds of applications that you could create using any conventional programming language. < nu m Java Technology: A Development Environment ●  As a development environment, Java technology provides you with a large suite of tools: –  A compiler An interpreter A documentation generator A class file packaging tool and so on... –  –  –  < nu m 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. < nu m ●  Versions of Java Oak: Designed for embedded devices Java: Original, not very good version (but it had applets) Java 1 Java 1.1: Adds inner classes and a completely new event-handling model Java 1.2: Includes “Swing” but no new syntax Java 1.3: Additional methods and packages, but no new syntax Java 1.4: More additions and the assert statement Java 1.5: Generics, enums, new for loop, and other new syntax Java
6:

A
few
new
features,
mostly
at
the
advanced
level
 10
nu m < Java 2 Java 5.0 Java Features ●  Some features of Java: –  The Java Virtual Machine Garbage Collection Code Security –  –  < nu m 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 –  < nu m 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 –  < nu m 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 < nu m 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 –  –  < nu m 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 < nu m Phases of a Java Program ●  The following figure describes the process of compiling and executing a Java program < nu m Phases of a Java Program < nu m 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 < nu m

Related docs
Java Basics
Views: 602  |  Downloads: 97
Java Introduction
Views: 57  |  Downloads: 4
Introduction to Java
Views: 71  |  Downloads: 21
Introduction to Java
Views: 78  |  Downloads: 16
Introduction to Java I/O
Views: 265  |  Downloads: 12
Introduction to Java
Views: 1  |  Downloads: 0
Introduction to Java Framling
Views: 113  |  Downloads: 3
Introduction to Java
Views: 44  |  Downloads: 13
A Brief Introduction to Java
Views: 73  |  Downloads: 22
history of java
Views: 44  |  Downloads: 7
JAVA
Views: 28  |  Downloads: 0
Introduction to Java Server Faces (JSF)
Views: 147  |  Downloads: 8
premium docs
Other docs by StuartSpruce
Storage Contract
Views: 539  |  Downloads: 29
Surrender of Germany info
Views: 216  |  Downloads: 0
Fictitious name certificates OF CORPORATION
Views: 223  |  Downloads: 1
Formats for Names in Legal Forms
Views: 519  |  Downloads: 18
ma_prit
Views: 174  |  Downloads: 1
Mom and Dad in the 60s[0]
Views: 292  |  Downloads: 0
Vermont articles of incorporation nonprofit
Views: 289  |  Downloads: 1
Internet_Venture_Confidentiality_Agreement
Views: 174  |  Downloads: 4
Real estate leasing and management
Views: 258  |  Downloads: 9
Sale of business with real and personal property
Views: 233  |  Downloads: 5
All corporate personal property
Views: 138  |  Downloads: 0
Chapter 11 bankruptcy
Views: 358  |  Downloads: 8
Transcript of Bill of Rights
Views: 212  |  Downloads: 1