2.1 Introduction to Java Technology

Slides:



Advertisements
Similar presentations
A Programmer's Introduction to Java - from a S/370 user (c) IDMS/SQL News
Advertisements

1 Copyright © 2005, Oracle. All rights reserved. Introducing the Java and Oracle Platforms.
1 G54PRG Programming Lecture 1 Amadeo Ascó Adam Moore G54PRG Programming Lecture 1 Amadeo Ascó 3 Java Programming Language.
Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
The road to reliable, autonomous distributed systems
Introduction to Java The objectives of this chapter are: To describe the key aspects of Java To describe the Java software development kit (SDK) To explain.
Object Orientated Programming
Java: History and Introduction (Lecture # 1). History… Java – Based on C and C++ – Developed in 1991 for intelligent consumer electronic devices – Green.
Introduction to Java Kiyeol Ryu Java Programming Language.
For more Lectures and Notes Visit
SM3121 Software Technology Mark Green School of Creative Media.
Introduction to Java.
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
01 Introduction to Java Technology. 2 Contents History of Java What is Java? Java Platforms Java Virtual Machine (JVM) Java Development Kit (JDK) Benefits.
LESSON 1 INTRODUCTION Compiled By: Edwin O. Okech [Tutor, Amoud University] JAVA PROGRAMMING.
CMSC 202 Computer Science II for Majors Fall 2009 Introduction.
Java program.
Introduction to Java Programming. Contents 1. Java, etc. 2. Java's Advantages 3. Java's Disadvantages 4. Types of Java Code 5. Java Bytecodes 6. Steps.
A Java Virtual Machine (JVM) enables a set of computer software programs and data structures to use a virtual machine model for the execution of other.
BASIC JAVA PROGRAMMING TUTORIAL. History  James Gosling and Sun Microsystems  Oak  Java, May 20, 1995, Sun World  Hot Java –The first Java-enabled.
BA22001 Introduction to Java Instructor: Jingwu He.
CSC 142 A 1 CSC 142 Introduction to Java [Reading: chapter 0]
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
Java Beserkers Group 4. Start of Java Development began on June of 1991 by a group of computer scientist at the Sun Mircrosystems Company Development.
CMSC 202 Computer Science II for Majors Object-Oriented Programming.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Programming Languages Machine.
Java Introduction Lecture 1. Java Powerful, object-oriented language Free SDK and many resources at
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
Java ACO101: Introduction to Computer Science. The History of Java Started out as a research project at Sun Microsystems in 1991 Code named “Green” Based.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
Introduction to Java Programming. Introduction Course Objectives Organization of the Book.
Session 1 Introduction to Java. Objectives Java Simplified / Session 1 / 2 of 32 Explain the history of Java Explain Java in brief List the types of Java.
What Is Java? According to Sun in a white paper: Java: A simple, object-oriented, network-savvy, interpreted, robust, secure, architecture-neutral, portable,
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
 Programming Language  Object Oriented Programming  JAVA – An Introduction  JAVA Milestones  JAVA Features.
We will talking about story of JAVA language. By Kristsada Songpartom.
JAVA Programming “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
introductory lecture on java programming
Java – in context Main Features From Sun Microsystems ‘White Paper’
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
ITP 109 Week 2 Trina Gregory Introduction to Java.
Introduction to Programming 1 1 2Introduction to Java.
Introduction to JAVA Programming
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. INTRODUCING.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Introduction CMSC 202 Fall Instructors Mr. Ryan Bergeron – Lecture Section 01 Tues/Thu 1:00 – 2:15 am, Sondheim 111 – Lecture Section 04 Tues/Thu.
Chapter 1 Coding Introduction.
Applications Active Web Documents Active Web Documents.
Object Oriented Programming in
Java™ 2 Platform Getting Started.
Before You Begin Nahla Abuel-ola /WIT.
Done By: Ashlee Lizarraga Ricky Usher Jacinto Roches Eli Gomez
Chapter 1 Introduction to Computers, Programs, and Java
Chapter No. : 1 Introduction to Java.
Topic: Difference b/w JDK, JRE, JIT, JVM
Introduction Enosis Learning.
PROGRAMMING IN JAVA. INTRODUCTION TO JAVA  Java is a general purpose computer programming language that is concurrent, class-based, object- oriented.
Introduction Enosis Learning.
Chapter 1 Introduction to Computers, Programs, and Java
Chapter 1 Coding Introduction.
Chapter 2: System Structures
(Computer fundamental Lab)
Java History, Editions, Version Features
By Rajanikanth B Overview Of Java By Rajanikanth B
Introducing Java.
Chap 1. Getting Started Objectives
Outcome of the Lecture Upon completion of this lecture you will be able to understand Fundamentals and Characteristics of Java Language Basic Terminology.
Presentation transcript:

2.1 Introduction to Java Technology ATS Application Programming: Java Programming 2.1 Introduction to Java Technology 2.1 Introduction to Java Technology ATS Application Programming: Java Programming © Accenture 2005 Course Code #Z16325

ATS Application Programming: Java Programming Contents 2.1 Introduction to Java Technology History of Java What is Java? Java Platforms Java Virtual Machine (JVM) Java Development Kit (JDK) Benefits and Features of Java © Accenture 2005 Course Code #Z16325

ATS Application Programming: Java Programming Objectives 2.1 Introduction to Java Technology Discuss a brief history of Java Define Java Differentiate Java Platforms J2EE J2SE J2ME Describe the Java Virtual Machine (JVM ) Explain the contents of the Java Development Kit (JDK) Describe benefits and features of Java © Accenture 2005 Course Code #Z16325

ATS Application Programming: Java Programming Brief History of Java 2.1 Introduction to Java Technology In 1990, Sun Microsystems began an internal project known as the Green Project to work on a new technology. In 1992, the Green Project was spun off and its interest directed toward building highly interactive devices for the cable TV industry. This failed to materialize. In 1994, the focus of the original team was re-targeted, this time to the use of Internet technology. A small web browser called HotJava was written. Oak was renamed to Java after learning that Oak had already been trademarked. In 1995, Java was first publicly released. In 1996, Java Development Kit (JDK) 1.0 was released. In 2002, JDK 1.4 (codename Merlin) was released, the most widely used version. In 2004, JDK 5.0 (codename Tiger) was released, the latest version. In 1990, Sun Microsystems began an internal project known as the Green Project to work on a new technology. Its team originally considered C++ as the language to use but soon abandoned it for an entirely new language called Oak. In 1992, the Green Project was spun off and its interest directed toward building highly interactive devices for the cable TV industry. This failed to materialize. In 1994, the focus of the original team was re-targeted, this time to the use of Internet technology. A small web browser called HotJava was written. Oak was renamed to Java after learning that Oak had already been trademarked. In 1995, Java was first publicly released In 1996, Java Development Kit (JDK) 1.0 was released In 2002, JDK 1.4 (codename Merlin) was released, the most widely used version In 2004, JDK 5.0 (codename Tiger) was released, the latest version The name Java was coined at a local coffee shop frequented by some of the members. It is not clear whether the name is an acronym or not. However some accounts claim that it stands for the names of James Gosling, Arthur Van Hoff, and Andy Bechtolsheim. Others, that it is an acronym for Just Another Vague Acronym. © Accenture 2005 Course Code #Z16325

ATS Application Programming: Java Programming James Gosling 2.1 Introduction to Java Technology James Gosling is generally credited as the inventor of the Java programming language He was the first designer of Java and implemented its original compiler and virtual machine He is also known as the Father of Java He is currently the Chief Technical Officer of Sun Microsystems © Accenture 2005 Course Code #Z16325

ATS Application Programming: Java Programming Java Quick Facts 2.1 Introduction to Java Technology 4.5 million Java developers, the largest community of software developers 75% of professional developers in the world use Java 1.75 billion devices run in Java 825 million Java-enabled smart cards 579 million Java-enabled mobile devices 635 Java-enabled phone models 700 million desktops with Java software 220,000 downloads of JDK 1.1 in just 3 weeks, 2 million after a year 2 million downloads for J2EE SDK JavaOne draws 20,000 becoming the world’s largest developer conference Over 400 Java user groups established worldwide Java runs on consumer and embedded devices more than any other software The software that powers the Mars Rover Java is Everywhere! © Accenture 2005 Course Code #Z16325

ATS Application Programming: Java Programming What is Java? 2.1 Introduction to Java Technology A multi-platform, network-centric, object-oriented programming language Multi-platform It can run on almost any computer platform Network-centric Designed with network in mind – “the network is the computer” Designed for building applications for the Internet Object-oriented It incorporates object-oriented programming model Clarify the term ‘multi-platform’. Java can run on any platform that supports Java by having a Java Runtime Environment (JRE). The major development platforms (UNIX, Windows, even some mainframes) support Java. Network-centric – Java tries to leverage the resources of computers that may reside remotely. © Accenture 2005 Course Code #Z16325

Java Platform Editions ATS Application Programming: Java Programming Java Platform Editions 2.1 Introduction to Java Technology A Java Platform is the set of APIs, class libraries, and other programs used in developing Java programs for specific applications There are 3 Java Platform Editions 1. Java 2 Platform, Standard Edition (J2SE) Core Java Platform targeting applications running on workstations 2. Java 2 Platform, Enterprise Edition (J2EE) Component-based approach to developing distributed, multi-tier enterprise applications 3. Java 2 Platform, Micro Edition (J2ME) Targeted at small, stand-alone or connectable consumer and embedded devices Recognizing that one size doesn’t fit all, Sun has grouped its technologies into three editions. Java 2 Platform, Standard Edition (J2SE) The J2SE platform is a fast and secure foundation for building and deploying client-side enterprise applications. In today's .com world of nanosecond response times and information gratification, J2SE technology provides the speedy performance and high functionality that is demanded by Web users. For end users, J2SE technology enables faster and easier use of functionally rich Web applications, such as corporate intranets and interactive shopping aids for e-commerce. For enterprise developers, the improved J2SE technology serves as the base tool for creating sophisticated, valuable applications that can be brought to market quickly. Java 2 Platform, Enterprise Edition (J2EE) J2EE technology simplifies enterprise applications by basing them on standardized, modular and re-usable components called Enterprise JavaBeans™ (EJB™), providing a complete set of services to those components, and handling many details of application behavior automatically. By automating many of the time-consuming and difficult tasks of application development, J2EE technology allows enterprise developers to focus on adding value, that is, enhancing business logic, rather than building infrastructure. Java 2 Platform, Micro Edition (J2ME) J2ME technology specifically addresses the vast consumer space, which covers the range of extremely tiny commodities such as smart cards or a pager all the way up to the set-top box, an appliance almost as powerful as a computer. J2ME technology enables device manufacturers, service providers, and content creators to gain a competitive advantage and capitalize on new revenue streams by rapidly and cost-effectively developing and deploying compelling new applications and services to their customers worldwide. Each edition is a developer treasure chest of tools and supplies that can be used with a particular product. Note that there are packages developed and supported by Sun that are not part of any edition such as (java3d for 3d graphics). © Accenture 2005 Course Code #Z16325

Java Development Kit (JDK) ATS Application Programming: Java Programming Java Development Kit (JDK) 2.1 Introduction to Java Technology Java Development Kit (JDK) Is a set of Java tools for developing Java programs Consists of Java API, Java Compiler, and JVM Java Application Programming Interface (API) Is prewritten code, organized into packages of similar topics Java Virtual Machine (JVM) Is an execution engine that runs compiled Java byte code Java Virtual Machine Java API MyProgram.java Hardware - Based Platform JDK JRE The Java platform is formed from two components: the Java Application Programming Interface (Java API) and the Java Virtual Machine (JVM). The Java API is a set of libraries that you can use to accomplish tasks like creating graphical user interfaces (GUIs), performing file input/output (I/O), or establishing network communication. The JVM is in charge of executing your code in a specific environment. A Java Development Kit (JDK) is a program development environment for writing Java applications. It consists of a runtime environment that "sits on top" of the operating system layer as well as the tools and programming that developers need to compile, debug, and run applications written in the Java language. The Java Runtime Environment (JRE), also known as Java Runtime, is part of the Java Development Kit (JDK), a set of programming tools for developing Java applications. The Java Runtime Environment provides the minimum requirements for executing a Java application; it consists of the Java Virtual Machine (JVM), core classes, and supporting files. © Accenture 2005 Course Code #Z16325

ATS Application Programming: Java Programming How does JVM work? 2.1 Introduction to Java Technology public class HelloWorld { public static void main(String args[ ]) { System.out.println(“Hello World!”); } Source Code A Java program is written The program is compiled A class file is produced containing bytecodes The bytecodes are interpreted by the JVM The JVM translates bytecodes into native machine code Java Virtual Machine (JVM), interprets compiled Java binary code (called bytecodes) for a computer's processor (or "hardware platform") so that it can perform Java program instructions. Java was designed to allow application programs to be built that could be run on any platform without having to be rewritten or recompiled by the programmer for each separate platform. A Java virtual machine makes this possible because it is aware of the specific instruction lengths and other particularities of the platform. The Java Virtual Machine Specification defines an abstract -- rather than a real -- machine or processor. The Specification specifies an instruction set, a set of registers, a stack, a “garbage heap," and a method area. Once a Java virtual machine has been implemented for a given platform, any Java program (which, after compilation, is called bytecodes) can run on that platform. A Java virtual machine can either interpret the bytecodes one instruction at a time (mapping it to a real processor instruction) or the bytecodes can be compiled further for the real processor using what is called a just-in-time compiler. Java is Compiled Once but can be Interpreted Dynamically Java source code is passed to a compiler that generates the bytecode. The bytecode is not targeted at any specific platform. Instead, a Java Virtual Machine(JVM) interprets the bytecode at runtime and executes it. This means that only the JVM itself is platform-dependent; the bytecode of your Java programs remains platform-independent. This is different than a truly compiled language like C or C++. In a compiled language, platform-dependent information must be linked into the compiled code, forcing one compiled version for every target platform. If you write a program to calculate the distances of stars from each other and want it to run on Microsoft Windows, Linux, Sun Solaris, and Macintosh, you would have to compile it four times, once for each system. The significant drawback with an interpreted language like Java is that code being dynamically interpreted executes more slowly than code that is compiled and native to a particular platform. Although this fundamental fact may be true, the JVM has been augmented over the years to become the Java HotSpot Virtual Machine (Java HotSpot VM). The HotSpot VM contains an adaptive compiler that allows performance hot spots be detected at runtime and optimized while your code is executing. This results in faster running code that still gains the benefits of being interpreted. Nowadays, properly designed Java programs execute at speeds comparable to similar program written in C++. In essence, the one black mark of being interpreted has been removed completely. Compiler Class File Bytecodes Java Virtual Machine Native Machine Code © Accenture 2005 Course Code #Z16325

Running on Different Platforms ATS Application Programming: Java Programming Running on Different Platforms 2.1 Introduction to Java Technology class HelloWorld { public static void main(String args[ ]) { System.out.println(“Hello World!”); } Java Program Compiler Hello World! Win32 Interpreter Hello World! Solaris Interpreter Hello World! MacOS Interpreter Java is Portable In the past, portability was not as much of a concern as it has become today. Most applications were fairly static in the sense that they were deployed on a consistent platform and did not require a lot of changes and tinkering to keep them running. However, in modern systems it is not at all uncommon for many components to be distributed across various hardware, operating systems, and networks. This heterogeneousness would pose great problems for many languages, but not Java! Java applications can run practically anywhere. This makes Java quite revolutionary. Essentially anything that has some kind of processor can be Java-enabled, from mainframes to personal computers to telephones and beyond. Java programs are flexible enough to be local applications, web-based applets, server-side applications, and embedded software. The application code does not usually have to be changed to run on these different devices either. This means you can truly write the code once and run it anywhere you wish. The key to this portability is the interpreted nature of the language. Since code does not have to be compiled to specific platforms, your Java program can be anywhere a JVM exists. The world does not run on one type of platform alone and new platforms are constantly being introduced. By being portable, java programs written today can still be viable tomorrow. © Accenture 2005 Course Code #Z16325

Key Benefits & Features of Java ATS Application Programming: Java Programming Key Benefits & Features of Java 2.1 Introduction to Java Technology Write Once, Run Anywhere Java is portable and platform independent Network-centric Can work with resources across a network and multi-tier architectures Object-oriented A Java program models a set of objects interacting with each other Robust Strong type checking Exception handling mechanism Automatic memory management Multithreaded A Java application can run several different processes called “threads” simultaneously Security Can download remote code over a network and run it in a secure environment Security levels and restrictions are highly configurable © Accenture 2005 Course Code #Z16325

ATS Application Programming: Java Programming Key Points 2.1 Introduction to Java Technology Java is multi-platform, network-centric, object-oriented programming language. James Gosling is the inventor of Java. There are three platforms of Java: J2SE, J2EE, J2ME. JDK is a set of tools for developing Java applications. JVM interprets Java programs and allows them to run on any platform. Java is portable, robust, multithreaded, and secured. © Accenture 2005 Course Code #Z16325

Questions and Comments ATS Application Programming: Java Programming Questions and Comments 2.1 Introduction to Java Technology ??? © Accenture 2005 Course Code #Z16325