CSE 452: Programming Languages. Acknowledgements. Contents. Java and its Evolution



Similar documents
Contents. Java - An Introduction. Java Milestones. Java and its Evolution

Java applets. SwIG Jing He

CS 209 Programming in Java #1

SE 450 Object-Oriented Software Development. Requirements. Topics. Textbooks. Prerequisite: CSC 416

CSC 551: Web Programming. Spring 2004

Chapter 1 Java Program Design and Development

Installing Java. Table of contents

An Overview of Java. overview-1

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1

INTRODUCTION TO JAVA PROGRAMMING LANGUAGE

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Java in Education. Choosing appropriate tool for creating multimedia is the first step in multimedia design

2 Introduction to Java. Introduction to Programming 1 1

1. Overview of the Java Language

Characteristics of Java (Optional) Y. Daniel Liang Supplement for Introduction to Java Programming

Programming Languages

A Short Introduction to Writing Java Code. Zoltán Majó

Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.

Java Software Development Kit (JDK 5.0 Update 14) Installation Step by Step Instructions

Habanero Extreme Scale Software Research Project

How To Write A Program In Java (Programming) On A Microsoft Macbook Or Ipad (For Pc) Or Ipa (For Mac) (For Microsoft) (Programmer) (Or Mac) Or Macbook (For

Software: Systems and Application Software

Chapter 1. Introduction to Computers, Programs, and Java

Syllabus for CS 134 Java Programming

Introduction to Object-Oriented Programming

How to use the Eclipse IDE for Java Application Development

The Java Virtual Machine and Mobile Devices. John Buford, Ph.D. Oct 2003 Presented to Gordon College CS 311

9/11/15. What is Programming? CSCI 209: Software Development. Discussion: What Is Good Software? Characteristics of Good Software?

Mobile Application Languages XML, Java, J2ME and JavaCard Lesson 04 Java

Agent Languages. Overview. Requirements. Java. Tcl/Tk. Telescript. Evaluation. Artificial Intelligence Intelligent Agents

Appendix A Using the Java Compiler

02 B The Java Virtual Machine

Java Crash Course Part I

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program

Crash Course in Java

Overview. Java Programming Language. What is Java in a NutShell? Architecture of Java Applets

C# and Other Languages

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program

Introduction to Java Programming. Kary Främling

Java Programming. Binnur Kurt Istanbul Technical University Computer Engineering Department. Java Programming. Version 0.0.

Evolution of the Major Programming Languages

Basic Java Constructs and Data Types Nuts and Bolts. Looking into Specific Differences and Enhancements in Java compared to C

LAB 1. Familiarization of Rational Rose Environment And UML for small Java Application Development

Lesson 06: Basics of Software Development (W02D2

Chapter 1 Programming Languages for Web Applications

Web Pages. Static Web Pages SHTML

picojava TM : A Hardware Implementation of the Java Virtual Machine

Installing Java (Windows) and Writing your First Program

For Introduction to Java Programming, 5E By Y. Daniel Liang

Fundamentals of Java Programming

Here's the code for our first Applet which will display 'I love Java' as a message in a Web page

Chapter 1 Fundamentals of Java Programming

Chapter 1 Introduction to Computers, Programs, and Java

Chapter 5: System Software: Operating Systems and Utility Programs

JAVA Web Database Application Developer

Chapter 27 Hypertext Transfer Protocol

Introduction to programming

1001ICT Introduction To Programming Lecture Notes

1/20/2016 INTRODUCTION

Programming CAN-based Fieldbus Systems using Java

Java History. Java History (cont'd)

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

Risks with web programming technologies. Steve Branigan Lucent Technologies

Section 1.4. Java s Magic: Bytecode, Java Virtual Machine, JIT,

CSC230 Getting Starting in C. Tyler Bletsch

Data Structures Lecture 1

Java with Eclipse: Setup & Getting Started

Java CPD (I) Frans Coenen Department of Computer Science

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Building Java Servlets with Oracle JDeveloper

Introduction to Java Applets (Deitel chapter 3)

Software. Programming Language. Software. Instructor Özgür ZEYDAN. Bülent Ecevit University Department of Environmental Engineering

Applets, RMI, JDBC Exam Review

Online Recruitment System 1. INTRODUCTION

How To Use A Sas Server On A Java Computer Or A Java.Net Computer (Sas) On A Microsoft Microsoft Server (Sasa) On An Ipo (Sauge) Or A Microsas (Sask

Web Development and Core Java Lab Manual V th Semester

core. Volume I - Fundamentals Seventh Edition Sun Microsystems Press A Prentice Hall Title ULB Darmstadt

Essentials of the Java(TM) Programming Language, Part 1

USE OF PYTHON AS A SATELLITE OPERATIONS AND TESTING AUTOMATION LANGUAGE

The Web Web page Links 16-3

Architecture Design For Web-based Application Systems. Instructor: Dr. Jerry Gao Class: CMPE296U

language 1 (source) compiler language 2 (target) Figure 1: Compiling a program

Example of Standard API

Implementing Java Distributed Objects with JDBC

Enterprise Java. Where, How, When (and When Not) to Apply Java in Client/Server Business Environments. Jeffrey Savit Sean Wilcox Bhuvana Jayaraman

Java programming for C/C++ developers

Application Servers - BEA WebLogic. Installing the Application Server

DIABLO VALLEY COLLEGE CATALOG

A Modular Approach to Teaching Mobile APPS Development

Tutorial 5: Developing Java applications

S y s t e m A r c h i t e c t u r e

Instrumentation Software Profiling

Building Applications Using Micro Focus COBOL

Citrix Access Gateway Enterprise Edition Citrix Access Gateway Plugin for Java User Guide. Citrix Access Gateway 8.1, Enterprise Edition

Real-time Device Monitoring Using AWS

Glossary of Object Oriented Terms

Essentials of the Java Programming Language

Java Programming Unit 1. Your first Java Program Eclipse IDE

Transcription:

CSE 452: Programming Languages Java and its Evolution Acknowledgements Rajkumar Buyya 2 Contents Java Introduction Java Features How Java Differs from other OO languages Java and the World Wide Web Java Environment Build your first Java Program Summary and Reference 3

Java - An Introduction Java - The new programming language developed by Sun Microsystems in 1991. Originally called Oak by James Gosling, one of the inventors of the Java Language. Java -The name that survived a patent search Java Authors: Gosling, Arthur Van, and others Java is really C++ -- ++ 4 Java Introduction Originally created for consumer electronics (TV, VCR, Freeze, Washing Machine, Mobile Phone). Java - CPU Independent language Internet and Web was just emerging, so Sun turned it into a language of Internet Programming. It allows you to publish a webpage with Java code in it. 5 Java Milestones Year 1990 1991 1992 1993 Development Sun decided to developed special software that could be used for electronic devices. A project called Green Project created and headed by James Gosling. Explored possibility of using C++, with some updates announced a new language named Oak The team demonstrated the application of their new language to control a list of home appliances using a hand held device. The World Wide Web appeared on the Internet and transformed the text -based interface to a graphical rich environment. The team developed Web applets (time programs) that could run on all types of computers connected to the Internet. 6

Java Milestones Year 1994 Development The team developed a new Web browsed called Hot Java to locate and run Applets. HotJava gained instance success. 1995 1996 Oak was renamed to Java, as it did not survive legal registration. Many companies such as Netscape and Microsoft announced their support for Java Java established itself it self as both 1. the language for Internet programming 2. a general purpose OO language. 1997- A class libraries, Community effort and standardization, Enterprise Java, Clustering, etc.. 7 Sun white paper defines Java as: Simple and Powerful Safe Object Oriented Robust Architecture Neutral and Portable Interpreted and High Performance Threaded Dynamic 8 Java Attributes Familiar, Simple, Small Compiled and Interpreted Platform-Independent and Portable Object-Oriented Robust and Secure Distributed Multithreaded and Interactive High Performance Dynamic and Extensible 9

Java is Compiled and Interpreted Programmer Hardware and Operating System Source Code Byte Code Text Editor Compiler Interpreter.java file.class file Notepad, emacs,vi javac java appletviewer netscape 10 Compiled Languages Programmer Source Code Object Executable Code Code Text Editor Compiler linker.c file.o file a.out file Notepad, emacs,vi gcc 11 Total Platform Independence JAVA COMPILER (translator) JAVA BYTE CODE (same for all platforms) JAVA INTERPRETER (one for each different system) Windows 95 Macintosh Solaris Windows NT 12

Architecture Neutral & Portable Java Compiler - Java source code (file with extension.java) to bytecode (file with extension.class) Bytecode - an intermediate form, closer to machine representation A interpreter (virtual machine) on any target platform interprets the bytecode. 13 Architecture Neutral & Portable Porting the java system to any new platform involves writing an interpreter. The interpreter will figure out what the equivalent machine dependent code to run 14 Rich Class Environment Core Classes language Utilities Input/Output Low-Level Networking Abstract Graphical User Interface Internet Classes TCP/IP Networking WWW and HTML Distributed Programs 15

How Does Java Compares to C++ and Other OO Languages 16 Overlap of C, C++, and Java C++ C Java 17 Java better than C++? No Typedefs, Defines, or Preprocessor No Global Variables No Goto statements No Pointers No Unsafe Structures? No Multiple Inheritance No Operator Overloading No Automatic Coercions No Fragile Data Types 18

Object Oriented Languages -A Comparison Feature C++ Objective Ada Java C Encapsulation Yes Yes Yes Yes Inheritance Yes Yes No Yes Multiple Inherit. Yes Yes No No Polymorphism Yes Yes Yes Yes Binding (Early or Late) Both Both Early Late Concurrency Poor Poor Difficult Yes Garbage Collection No Yes No Yes Genericity Yes No Yes Limited Class Libraries Yes Yes Limited Yes 19 Java Integrates Power of Compiled Languages and Flexibility of Interpreted Languages 20 Java Applications We can develop two types of Java programs: Stand-alone applications Web applications (applets) 21

Applications v/s Applets Different ways to run a Java executable are: Application- A stand-alone program that can be invoked from command line. A program that has a main method Applet- A program embedded in a web page, to be run when the page is browsed. A program that contains no main method 22 Applets v/s Applications Different ways to run a Java executable are Application- A stand-alone program that can be invoked from command line. A program that has a main method Applet- A program embedded in a web page, to be run when the page is browsed. A program that contains no main method Application Executed by the Java interpreter. Applet- Java enabled web browser. 23 Java and World Wide Web Turning the Web into an Interactive and Application Delivery Platform 24

What is World Wide Web? Web is an open-ended information retrieval system designed to be used in the Internet wide distributed system. It contains Web pages (created using HTML) that provide both information and controls. Unlike a menu driven system--where we are guided through a particular direction using a decision tree, the web system is open ended and we can navigate to a new document in any direction. 25 Web Structure of Information Search/Navigation 26 Web as a delivery Vehicle 27

Execution of Applets 1 APPLET Development hello.java AT SUN.COM 2 hello.class AT SUN S WEB SERVER 3 Create Applet tag in HTML document 4 Accessing from Unimelb.edu.au 5 The browser creates a new window and a new thread and then runs the code Hello Java <app= Hello > The Internet Hello 28 Significance of downloading Applets Interactive WWW Flashy animation instead of static web pages Applets react to users input and dynamically change Display of dynamic data WWW with Java - more than a document publishing medium http://www.javasoft.com/applets/alpha/applets/sto ckdemo/standalone.html 29 Power of Java and the Web Deliver applications, not just information Eliminate porting Eliminate end-user installation Slash software distribution costs Reach millions of customers - instantly 30

Java Development Kit javac - The Java Compiler java - The Java Interpreter jdb- The Java Debugger appletviewer -Tool to run the applets javap - to print the Java bytecode javaprof - Java profiler javadoc - documentation generator javah - creates C header files 31 Java Environment 32 Java Development Kit javac - The Java Compiler java - The Java Interpreter jdb- The Java Debugger appletviewer -Tool to run the applets javap - to print the Java bytecodes javaprof - Java profiler javadoc - documentation generator javah - creates C header files 33

Process of Building and Running Java Programs Text Editor Java Source Code javadoc HTML Files javac Java Class File javah Header Files java jdb Outout 34 Let us Try Out Building your first Java Program 35 Hello Internet // hello.java: Hello Internet program class HelloInternet { public static void main(string args[]) { System.out.println( Hello Internet ); } } 36

Program Processing Compilation # javac hello.java results in HelloInternet.class Execution # java HelloInternet Hello Internet # 37 Simple Java Applet //HelloWorld.java import java.applet.applet; import java.awt.*; public class HelloWorld extends Applet { } public void paint(graphics g) { g.drawstring ( Hello World!,25, 25); } 38 Calling an Applet <HTML> <TITLE>HELLO WORLD APPLET</TITLE> <HEAD>THE HELLO WORLD APPLET</HEAD> <APPLET CODE= HelloWorld.class width=500 height=500> </APPLET> </HTML> 39

Applet Execution Using AppletViewer Using Browser 40 Java on my platform? Sun (SPARC) ftp://java.sun.com Sun(x86) ftp://xm.com:/pub/ IBM(Aix, OS/2)ftp://ncc.hursley.ibm.com/javainfo DEC(Alpha OSF/1) http://www.gr.osf.org:8001/projects/web/java/ SGI http://liawww.epfl.ch/~simon/java/irix-jdk.html HP http://www.gr.osf.org:8001/projects/web/java linux http://www.blackdown.org AT & T http://www.gr.osf.org:8001/projects/web/java Windows 3.1 http://www.alphaworks.ibm.com 41 Summary Java has emerged as a general purpose OO language. It supports both stand alone and Internet Applications. Makes the Web Interactive and medium for application delivery. Provides an excellent set of Tools for Application Development. Java is ubiquitous! 42