CS2200 Software Development Lecture: Java Platform Lecturer: Adrian O’Riordan Course Webpage:

Slides:



Advertisements
Similar presentations
1 Copyright © 2005, Oracle. All rights reserved. Introducing the Java and Oracle Platforms.
Advertisements

Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
Lab Information Security Using Java (Review) Lab#0 Omaima Al-Matrafi.
Lab#1 (14/3/1431h) Introduction To java programming cs425
The Java Language. Topics of this Course  Introduction to Java  The Java Language  Object Oriented Programming in Java  Exceptions Handling  Threads.
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.
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.
Introduction to Java Programming, 4E
Java Programming, 3e Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
1 Chapter 3 Programs and Packages. 2 Java Virtual Machine (JVM) Java programs execute on the JVM. The JVM is a virtual rather than a physical machine,
J2EE Java 2 Enterprise Edition. Relevant Topics in The Java Tutorial Topic Web Page JDBC orial/jdbc
1-1 Copyright (c) 1999 N. Afshartous Introduction to Java™
Introduction to Java.
Session-02. Objective In this session you will learn : What is Class Loader ? What is Byte Code Verifier? JIT & JAVA API Features of Java Java Environment.
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.
Suma D Event Driven programming using java(CSE210) Overview of java Packages and interface Exception handling Multithreading Input/output.
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.
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
Introduction to Java Kumar Harshit. Objectives ( 목적지 ) At the end of the lesson, the student should be able to: ● Describe the features of Java technology.
Lecturer PEN PHIROM Tel : Web site: Lecturer PEN PHIROM Tel :
Advanced Java New York University School of Continuing and Professional Studies.
1. 2 is high level programming language like C++, Visual Basic, developed by James Gosling and Patrick Naughton at Sun Microsystems in 1991.
CMSC 202 Computer Science II for Majors Object-Oriented Programming.
Java Introduction Lecture 1. Java Powerful, object-oriented language Free SDK and many resources at
Enterprise Java Beans Java for the Enterprise Server-based platform for Enterprise Applications Designed for “medium-to-large scale business, enterprise-wide.
Sadegh Aliakbary Sharif University of Technology Fall 2012.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
The Basics of Javadoc Presented By: Wes Toland. Outline  Overview  Background  Environment  Features Javadoc Comment Format Javadoc Program HTML API.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
JAVA Java is a programming language and computing platform first released by Sun Microsystems in It was first developed by James Gosling at Sun Microsystems,
1.8History of Java Java –Based on C and C++ –Originally developed in early 1991 for intelligent consumer electronic devices Market did not develop, project.
Introduction to Java Programming with Forte Y. Daniel Liang.
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.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
23-October-2002cse JavaIntro © 2002 University of Washington1 Intro to Java CSE 413, Autumn 2002 Programming Languages
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Java: An Overview John R Durrett Texas Tech University.
What is Java? Object Oriented Programming Language Sun Microsystems “Write Once, Run Everywhere” Bytecode and Virtual Machine Java Platform (Java VM and.
Java – in context Main Features From Sun Microsystems ‘White Paper’
Java Programming: Advanced Topics1 Introduction to Advanced Java Programming Chapter 1.
Introduction to Programming 1 1 2Introduction to Java.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 15: Java Basics Fundamentals of Web Programming.
Introduction to JAVA Programming
JAVA TRAINING IN NOIDA. JAVA Java is a general-purpose computer programming language that is concurrent, class-based, object-oriented and specifically.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
Chapter 13 Web Application Infrastructure
Applications Active Web Documents Active Web Documents.
Object Oriented Programming in
Part II Software When developing software there are several particularities to be aware of: Java is widespread used because of the platform independence.
Chapter 1 Introduction to Computers, Programs, and Java
Introduction to Advanced Java Programming
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.
(Computer fundamental Lab)
Java History, Editions, Version Features
By Rajanikanth B Overview Of Java By Rajanikanth B
F II 1. Background Objectives
Introducing Java.
Chap 1. Getting Started Objectives
Chap 4. Programming Fundamentals
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:

CS2200 Software Development Lecture: Java Platform Lecturer: Adrian O’Riordan Course Webpage:

Java Programming Language Java is an object oriented programming language based on C and C-based object oriented languages such as C++ and Objective C. Mesa, Oberon, and Smalltalk were also influences. Specifications of the Java language, the Java Virtual Machine (JVM) and the Java API are community-maintained through the Sun- managed Java Community Process. The Java Runtime Environment (JRE) is the software required to run any application deployed on the Java platform. End-users commonly use a JRE in software packages and plugins. Sun distributes a superset of the JRE called the Java SDK which includes development tools such as the Java compiler, Javadoc, and debugger.

Features of Java Simple – simpler than C++ Architecture neutral bytecode intermediate format Object oriented - from the ground up Portable - standard specification Distributed - Java platform High performance - efficient Multithreaded - built in synchronization primitives Robust - extensive compile-time checking, followed by a second level of run-time checking and exception handling Dynamic - run-time system, classes are linked only as needed Secure - for networked environments Web-enabled - Webstart, applets, and servlets Popular and free - widely used Tool support – many compilers, supporting IDEs, etc.

Example Feature: Java Garbage Collection Basic variables have a predefined duration; objects do not JVM manages memory for you - there is no facility to manually destroy objects in Java Java collects “garbage” objects that are no longer needed - objects that no longer have any references to them Un-used objects are not deleted immediately but –when JVM decides that the amount of free memory is low –when the program terminates –when you invoke System.gc() Java's use of garbage collection can make Java unsuitable for time- critical applications Contrast: C++ programmers have complete control over the allocation and de-allocation of memory

Java Limitations? Look and feel of Swing – default is significantly different from native apps; new pluggable look and feel system of Swing allows different looks Performance issues – although recent versions significantly faster than earlier ones and now has JIT compiler Not fully object oriented – primitive types are not objects Lack of some object oriented features – e.g. operator overloading and multiple inheritance Java was subject to proprietary license – now free software and open source

Java Timeline I First made public as Oak programming language developed under James Gosling at Sun as part of a project codenamed Green. As a prototype, Patrick Naughton wrote a small web browser, WebRunner, later renamed HotJava. Oak was renamed Java Achieved prominence following the announcement at 1995's SunWorld that Netscape would be including support for it in their Navigator browser Initial release JDK JDK 1.1 Released. Adds inner classes to core language. Also adds Java Beans, JDBC and RMI Version 1.2 introduces major changes including Swing graphical API, This and subsequent releases branded Java 2. JVM has a JIT compiler for the first time. Collections framework added.

Java Timeline II J2SE 1.4 released. Adds assert keyword, regular expressions, and Java WebStart among changes Major new release Java 5 (Release 1.5) codename Tiger introduces a number of new features. –generics – type safe collections –annotations for metadata –autoboxing- automatic type conversions between promitive types –enumerations – ordered list of values –new for loop iterator syntax 2006 Java SE 6 released. Performance improvements. GUI improvements

Java Platforms Sun has defined three platforms targeting different application environments and segmented many of its APIs so that they belong to one of the platforms. The platforms are: –Java Platform, Micro Edition — targeting environments with limited resources, –Java Platform, Standard Edition — targeting workstation environments, and –Java Platform, Enterprise Edition — targeting large distributed enterprise or Internet environments. The classes in the Java APIs are organized into separate groups called packages. Each package contains a set of related interfaces, classes and exceptions. Java Platform, Standard Edition or Java SE is a collection of Java Application Programming Interfaces useful to any Java platform programs.

Java SE 6 Platform

JDK Programmers can create Java applications using simple tools such as editors, and command line tools such as provided by Sun’s JDK (Java SE Development Kit). Basic tools include: javac - compiler for the Java programming language java - launcher for Java applications javadoc - documentation generator appletviewer - run and debug applets jar - create and manage Java Archive (JAR) files jdb - Java Debugger Many other tools for e.g. security, networking, monitoring

Java Virtual Machine I runtime carries out emulation of the JVM instruction set by interpreting it; has a stack-based † architecture - each thread has its own stack and program counter each particular host operating system needs its own implementation of the JVM and runtime. verifies all bytecode before it is executed for security reasons - designed to allow safe execution of untrusted code from remote sources as in Java applets - remote code runs in a restricted sandbox † a model of computation in which the computer's memory takes the form of one or more stacks - data structures based on the principle of Last In First Out (LIFO)

Java Virtual Machine II HotSpot contains class loader, bytecode interpreter, Client and Server runtime compilers, garbage collectors, a set of supporting runtime libraries. Many JVM implementations, e.g. –HotSpot (Sun) –Kaffe (open source) –IBM J9 (IBM WebSphere) –IKVM.NET (free) –Apache Harmony (open source) Exists programming languages for the Java virtual machine aside of Java itself, e.g. AspectJ, JRuby, Groovy

Important packages java.lang - fundamental classes and interfaces closely tied to the language and runtime system, including the root classes that form the class hierarchy, types tied to the language definition, basic exceptions, threading, and security functions; automatically imported into every source file. java.io support for input and output - primarily streams java.net - networking including HTTP requests java.math - mathematics support java.util - data structures and also Scanner class java.awt and javax.swing – GUIs java.applet – For creation of Web applets java.sql – database access java.beans – components Java.net - networking

Java Libraries Core libraries: –Collection libraries which implement data structures –XML Processing libraries –Security –Internationalization and localization libraries Integration libraries, to communicate with external systems: –Java Database Connectivity (JDBC) for database access –Java Naming and Directory Interface (JNDI) for lookup and discovery –RMI and CORBA for distributed application development User Interface libraries, which include: –The (heavyweight, or native) Abstract Windowing Toolkit –The (lightweight) Swing libraries, which are built on AWT but provide (non-native) implementations of the AWT widgetry –Java 2D and APIs for audio capture, processing, and playback

Java Technology Summary Development Tools (JDK) – compiling (e.g. javac), running (e.g. java), documenting (javadoc), debugging (jdb) APIs (Application Programming Interface) – library specs Deployment Technology – applications, applets, JAR files, Web Start, plug-ins User Interface and Graphics Toolkits – Swing, AWT, Java 2D Integration Libraries – JDBC – database connect, Java RMI Components, Enterprise Java – JavaBeans, Servlets, J2EE

Applets, Servlets and Java Web Start Applets –included in an HTML page - tag –run in Web browser (requires a plugin) or JDK’s AppletViewer –in Java since the beginning –Used to provide interactive features to webpages Servlets –Java Servlet allows addition of dynamic content to a Web server –JavaServer Pages (JSP) allows dynamic generation of HTML, XML or other types of documents in response to a Web client request Java Web Start –started directly from the Internet using a web browser but do not run in the browser

Web refs Java Beginnings – Early years at SunJava Beginnings Java History – FeizabadiJava History 1996 White Paper Java Community Process Java SE Java EE java.net Portal