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.

Slides:



Advertisements
Similar presentations
What is a Computer Program? For a computer to be able to do anything (multiply, play a song, run a word processor), it must be given the instructions.
Advertisements

1 Copyright © 2005, Oracle. All rights reserved. Introducing the Java and Oracle Platforms.
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
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.
Lecture 2: Do you speak Java?. From Problem to Program Last Lecture we looked at modeling with objects! Steps to solving a business problem –Investigate.
Introduction to Java Kiyeol Ryu Java Programming Language.
1 Introduction to Java and Applet Lecture 3 from Chapters 1 and 2 of the complete reference.
Introduction to Java Programming, 4E
Java Programming, 3e Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
For more Lectures and Notes Visit
1 Java Server Pages Can web pages be created specially for each user? What part does Java play?
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.
Java PAL.  Contains the development kit and the runtime environment ( aka the Java Virtual Machine )  Download Link:
Advanced OOP MCS-3 OOP BSCS-3 Lecture # 1
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.
BASIC JAVA PROGRAMMING TUTORIAL. History  James Gosling and Sun Microsystems  Oak  Java, May 20, 1995, Sun World  Hot Java –The first Java-enabled.
Lesson 4 Computer Software
INTRODUCTION TO WEB DATABASE PROGRAMMING
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
CSC 142 A 1 CSC 142 Introduction to Java [Reading: chapter 0]
Chapter 1 Coding Introduction.
Introduction to Java Programming with JBuilder 4
S.W. Ma/CIM/LWL41211/2 Prog. IIA Page 1 HKIVE (Lee Wai Lee Campus) Department of CIM Course : Year 2 Module : Programming IIA Textbook : Introduction.
Applets & Servlets.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
CS413: Java Programming language Applications Applets
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Programming Languages Machine.
Why Java? A brief introduction to Java and its features Prepared by Mithat Konar.
The Basics of Javadoc Presented By: Wes Toland. Outline  Overview  Background  Environment  Features Javadoc Comment Format Javadoc Program HTML API.
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.
Java Applets. 2 Introduction to Java Applet Programs  Applications are stand alone programs executed with Java interpreter executed with Java interpreter.
Chapter 13. Applets and HTML HTML Applets Computer Programming with JAVA.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
Jaeki Song ISQS6337 JAVA Lecture 03 Introduction to Java -The First Java Application-
Chapter 1: Introduction to Programs, and Java 1. Objectives To review programs (§ ). To understand the relationship between Java and the World Wide.
Introduction to Java Programming with Forte Y. Daniel Liang.
Introduction to Java Programming. Introduction Course Objectives Organization of the Book.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
Applets Yong Choi School of Business CSU, Bakersfield.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Application Architecture Using Java Hong Li. Introduction Developed by a team led by James Gosling at Sun Microsystem. Originally called Oak, designed.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
Introduction to Java Programming. 2 Chapter 1 Introduction to Java and Forte F What Is Java? F Getting Started With Java Programming –Create, Compile.
Java – in context Main Features From Sun Microsystems ‘White Paper’
JavaScript 101 Introduction to Programming. Topics What is programming? The common elements found in most programming languages Introduction to JavaScript.
Java Programming: Advanced Topics1 Introduction to Advanced Java Programming Chapter 1.
Introduction to JAVA Programming
Java Programming, 3e Concepts and Techniques Chapter 1 Section 56 – An Introduction to Java.
Introduction to Java Programming, 4E Y. Daniel Liang.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
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 1 Coding Introduction.
Applications Active Web Documents Active Web Documents.
Part II Software When developing software there are several particularities to be aware of: Java is widespread used because of the platform independence.
Introduction to Computers, the Internet and the World Wide Web
Chapter 1 Introduction to Computers, Programs, and Java
Introduction to Advanced Java Programming
Chapter 1 Coding Introduction.
Introducing Java.
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:

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 programs List Java Capabilities Differentiate between applets and applications Explain the Java Virtual Machine (JVM) List the features of some IDEs Examine the JDK and tools under it Analyze future trends and technologies

Introduction to Java Java Simplified / Session 1 / 3 of 32 Java being secure, portable, and platform independent was found to be capable of addressing large scale problems across the Internet. Introduced in 1995 by Sun Microsystems Its objective was to develop a software for embedding in consumer electronic devices. Initially called ‘Oak’ Internet users had problems of portability and platform independence.

What is Java? Java Simplified / Session 1 / 4 of 32 A cross platform language It is used to create stand-alone applications, net based programs and consumer devices programs. Example : cellular phones, palm pilots An object-oriented programming language

Java and the Internet Java Simplified / Session 1 / 5 of 32 Applets can respond to user input and actions. Programs on the net are either static or dynamic. Applets helps to develop dynamic programs. Applets run on a Java enabled web browser.

Security issues Java Simplified / Session 1 / 6 of 32 This can be a potential risk for the user’s system. An Applet has to be downloaded on the user’s system before it can work. Hence, applets are restricted from accessing all areas of the disk.

Security issues Contd… Java Simplified / Session 1 / 7 of 32 JVM generates byte codes as a result of compilation Byte codes cannot be executed without the JVM The control is exercised by the

Features in Java2 Java Simplified / Session 1 / 8 of 32 Drag and Drop: interactively transfers information across different applications. Also transfers information interactively from one part of a program’s interface to another. Swing: new set of classes and interfaces used to create an advanced GUI

Features in Java2 Contd… Java Simplified / Session 1 / 9 of 32 Java Sound: totally new set of features pertaining to Java’s audio features RMI: Remote Method Invocation allows applications to call objects located at remote sites and communicate with them Java 2D API: set of classes for advanced 2D graphics and imaging

Types of Java Programs Java Simplified / Session 1 / 10 of 32 Applets Programs created specially to work with the Internet Displays an image GUI to accept user input

Types of Java Programs Contd… Console applications Java programs that run from a command prompt and do not display any GUI screen Java Simplified / Session 1 / 11 of 32

Types of Java Programs Contd… Java Simplified / Session 1 / 12 of 32 GUI Applications : Java programs that run stand-alone and accept user input through a GUI based screen.

Types of Java Programs Contd… Java Simplified / Session 1 / 13 of 32 Client sends request which is processed by the server The server side APIs extend capabilities of standard APIs and are known as Servlets Also called server side applets Example – HTML form processing, processing databases and performing server side transactions Servlets Suitable for web based n-tier application development

Types of Java Programs Contd… Java Simplified / Session 1 / 14 of 32 Programmers can create their own packages or use the built-in packages java.awt, java.io and java.applet are some examples Database applications Uses JDBC API for database connectivity Programs can be either applets or application Packages Class libraries in Java

What can we do with Java? Java Simplified / Session 1 / 15 of 32 Colorful scrolling banner for web pages Interactive quizzes A program that plays audio, displays a banner and animates images at the same time Interactive games that can run as stand alone or be deployed on the web One can develop: Create a wide variety of applications from a simple computation program to complex distributed application

Java Simplified / Session 1 / 16 of 32

Difference between Applets and Applications Java Simplified / Session 1 / 17 of 32 Do not need a browser to execute These run within JVM Executed in a java compatible web browser Applets load and run on a Java-enabled web browser Applications Applets

Difference between Applets and Applications Contd… Java Simplified / Session 1 / 18 of 32 Manages its own flow of execution No restrictions about reading or writing from/to the local file system Flow of execution is partly managed by the browser context Cannot read/write from/to the local file system Applications Applets

Similarities in Applets and Applications Both can use the Abstract Windowing Toolkit (AWT) Java Simplified / Session 1 / 19 of 32 Both need to use the standard Java class libraries

Java Virtual Machine (JVM) Java Simplified / Session 1 / 20 of 32 Java code can run on any platform by using JVM JVM normally reads and executes Java statements one at a time JVM is responsible for platform independence and small size compiled code Recognizes only a particular binary format called a class file Has an interpreter component that enables communication between Java byte code and a computer’s operating system

Visual Development Tools Java Simplified / Session 1 / 21 of 32 Simplifies the software development process Includes class browser for viewing and navigating through the class hierarchy Includes a source code editor that helps code programs Helps in quick and efficient development of Java applications and applets

Some Visual Development Tools Java Simplified / Session 1 / 22 of 32 Borland Jbuilder from Borland/Inprise Includes an integrated editor, debugger, compiler, visual designer, wizards and sample applications Forte for Java, Community Edition from Sun Microsystems Integrated visual design, editing, compilation and debugging capabilities to create applets and applications Visual Age for Java from IBM Works with existing databases, applications and transactions

Java Development Kit (JDK) Java Simplified / Session 1 / 23 of 32 A set of command line tools Three major releases are: Java 1.0 – first release Java 1.1 – 1997 release Java – latest release Freely available at Sun’s official website Contains the software and tools needed to compile, debug and execute applets and applications

Tools under JDK Java Simplified / Session 1 / 24 of 32 Syntax: javac [option] source Source files ends with an extension of.java Options include: -classpath -d -g -o -verbose javac: compiler used to compile Java source code

Tools under JDK Contd… Java Simplified / Session 1 / 25 of 32 java [option] classname [arguments] Options can include -classpath -Dname name -help -v or –verbose -X java: interpreter used to execute Java byte codes

Tools under JDK Contd… Java Simplified / Session 1 / 26 of 32 javadoc: This is the Java documentation tool Generates detailed documentation in HTML form for any.java source code or package appletviewer: Used to view and test applets Syntax: appletviewer [options] url

New Features of Java Java Simplified / Session 1 / 27 of 32 Improved Compiling Speeds Divisions of integers and floating point numbers Provides support to IE and Netscape for redirecting URLs New I/O Class added Few bugs have been removed in AWT

New Features of Java Contd… Java Simplified / Session 1 / 28 of 32 A new class to provide endless support for mouse wheel scrolling. Supports the standard Microsoft Windows XP appearance as default when running on Windows XP platform. Indeterminate progress bars have been added. JTabbedPane displays a single, scrollable run of tabs. A spinner is a single line input field that lets the user select a number or an object value from an ordered set.

Present Java Technologies Java Simplified / Session 1 / 29 of 32 Support for distributed computing in the form of features such as RMI Database management support in the form of JDBC Reusable software components in the form of JavaBeans Creation and deployment of applications that can run on any operating system

Present Java Technologies Contd… Java Simplified / Session 1 / 30 of 32 Java 2 Enterprise Edition (J2EE) which includes:

Future trends Java Simplified / Session 1 / 31 of 32 Miniature devices such as Palm pilots and mobile phones are equipped with a features such as , gaming options and many others. They are based upon Java 2 Micro Edition (J2ME). New products in the area of embedded technologies for consumer devices by making use of mobile computing.

Summary Java Simplified / Session 1 / 32 of 32 Java was introduced by Sun Microsystems in Java is a programming language popularly used to build programs that can work on the Net. Its primary features are that it is object-oriented and a cross platform language. Swing, Drag and Drop, Java 2D API, Java Sound and RMI are some of the features added to the existing version of Java. A Java applet is designed to work in a pre-defined “sandbox” only. This makes it safe to be used on the Internet. Java bytecodes are machine language instructions understood by the Java Virtual Machine and usually generated as a result of compiling Java language source code.

Summary Contd… Java Simplified / Session 1 / 33 of 32 Java programs can be divided into following categories - applets, applications, GUI applications, servlets and database applications. Java visual development tools help to develop Java applications and applets more quickly and efficiently. The JDK contains the software and tools needed to compile, debug and execute applets and applications written in the Java language. It’s basically a set of command-line tools. Enhancement in Swing, AWT, a new I/O class and so on has been added in the latest version of Java The future will use a lot of Java related programs for consumer gadgets with embedded technologies.