Java Programming Lecture 1 Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University

Slides:



Advertisements
Similar presentations
CSci 1130 Intro to Computer Programming in Java
Advertisements

Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
JAVA BASICS. Why Java for this Project? Its open source - FREE Java has tools that work well with rdf and xml –Jena, Jdom, Saxon Can be run on UNIX,Windows,LINUX,etc.
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.
Applets. The Applet Class public class MyApplet extends java.applet.Applet {... /** The no-arg constructor is called by the browser when the Web page.
Review of Java Applets Vijayan Sugumaran Decision and Information Sciences Oakland University.
 2003 Prentice Hall, Inc. All rights reserved. 1 Chapter 3 - Introduction to Java Applets Outline 3.1 Introduction 3.2 Sample Applets from the Java 2.
Excerpts from Introduction to Java Programming, 4E Author: Y. Daniel Liang (Copyright by Prentice Hall)
Introduction to Java Programming, 4E
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 16 Applets.
Applets, Graphical User Interfaces, and Threads / Chapter 9 1 Applets, Graphical User Interfaces, and Threads.
Java Applets. Road Map Introduction to Java Applets Review applets that ship with JDK Make our own simple applets –Introduce inheritance –Introduce the.
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 14 Applets, Images,
Programming Software Applications Week 1 Dr. Xiaohong Gao Trent Park – B107, ext. 2252
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved L05 (Chapter 16) Applets.
01 Introduction to Java Technology. 2 Contents History of Java What is Java? Java Platforms Java Virtual Machine (JVM) Java Development Kit (JDK) Benefits.
Java Programming Language Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University
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.
Introduction to Java Programming CS 21a: Introduction to Computing I Department of Information Systems and Computer Science Ateneo de Manila University.
Introduction to Java Programming with JBuilder 4
Introduction to Java Programming CS 21a: Introduction to Computing I First Semester,
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  The Applet Class  The HTML Tag F Passing Parameters to Applets.
Computer Science [3] Java Programming II - Laboratory Course Lab 6: Introduction to Java Applets Sample Applets from the Java Simple Java Applet: Drawing.
Java Workshop for Teachers May 6, 2005 A Brief Look at the Java Programming Language.
Introduction to Computers and Java Chapter 1.3. A Sip of Java: Outline History of the Java Language Applets A First Java Program Compiling a Java Program.
Introduction to Java Programming. History F James Gosling and Sun Microsystems F Oak F Java, May 20, 1995, Sun World F HotJava –The first Java-enabled.
1 Part I : Chapter 01 Introduction to Java Programming.
Java Applets. 2 Introduction to Java Applet Programs  Applications are stand alone programs executed with Java interpreter executed with Java interpreter.
OOP (Java): Simple/ OOP (Java) Objectives – –give some simple examples of Java applications and one applet 2. Simple Java Programs Semester.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
Introduction to Java Programming with Forte Y. Daniel Liang.
Clement Allen, PhD Florida A&M University SUMMER 2006.
The Joy of Programming (also known as) Introduction to Object-Oriented Programming.
3C Technologies & Information Appliances Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University
Introduction to Java Applets Sangeetha Parthasarathy 05/21/2001.
Applets. What is an applet? Why create applets instead of applications? – Applets are Java programs that can be embedded in an HTML document – In contrast,
Introduction to Java Programming. Introduction Course Objectives Organization of the Book.
Java Applets. 2 Introduction to Java Applet Programs Applications are ___________________ programs –executed with Java interpreter Applet is a small program.
COP2800 – Computer Programming Using JAVA University of Florida Department of CISE Spring 2013 Lecture 35 – Overview of Java Web Programming Webpage:
SOFTWARE TECHNOLOGY - I JAVA/OOP Wickramanayake HMKSK Department of Electrical & Electronic Engineering Faculty of Engineering University.
Java -- A very Hot Object- Oriented Language Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung Institute.
J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program Design, Second Edition Second Edition D.S. Malik D.S. Malik.
Chapter 14 Applets and Advanced GUI  The Applet Class  The HTML Tag F Passing Parameters to Applets F Conversions Between Applications and Applets F.
Lecture 1. Introduction to Programming and Java MIT- AITI 2003.
Java -- A very Hot Object- Oriented Language Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung Institute of.
Your name CSCI/CMPE 3326 Object-Oriented Programming in Java Dongchul Kim Department of Computer Science University of Texas – Pan American 1.Applet.
1 Applets. 2 Design of Applets 3 Sun wrote Java to be executable within a hosting application browser The applications are applets. An applet is downloaded.
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.
Creating a Java Application and Applet
Introduction to Java Programming. 2 Chapter 1 Introduction to Java and Forte F What Is Java? F Getting Started With Java Programming –Create, Compile.
CSI 3125, Preliminaries, page 1 Applet. CSI 3125, Preliminaries, page 2 Applet An applet is a Java program that runs in a Web browser. An applet can be.
CSCI 115 Computer Programming Overview. Computer Software System Software –Operating systems –Utility programs –Language compilers Application Software.
Lecture1 Instructor: Amal Hussain ALshardy. Introduce students to the basics of writing software programs including variables, types, arrays, control.
CPSC 233 Tutorial 01 & 05 Jan 19 Edwin Chan. ■“Office”: ICT 524 –Please me ■Continuous Tutorial: Thursdays, 12-2PM (outside MS.
WEEK 2 1 Software Concepts -- Introduction Now we can begin to examine the basic ideas behind writing programs Chapter 2 focuses on: history.
CS202 Java Object Oriented Programming GUI Programming – Applets Chengyu Sun California State University, Los Angeles.
Introduction to Java Programming, 4E Y. Daniel Liang.
Chapter No. : 1 Introduction to Java.
Chapter Two Applet vs. Application
Applets.
Java Applets.
Introduction to Java Brief history of Java Sample Java Program
Applet in Java.
Java Evolution Java History. Java Features.
A Brief History January 1996: first official release JDK 1.0
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:

Java Programming Lecture 1 Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University

Contents (chapter 1) Short History Short History Java Development tools Java Development tools Install JBuilder Tool and Samples Install JBuilder Tool and Samples Getting Started With Java Programming Getting Started With Java Programming  Compiling and Running a Java Application  Compiling and Running a Java Applet

History James Gosling James Gosling Oak (Embedded consumer electronic appliances) Oak (Embedded consumer electronic appliances) Java, May 20, 1995, Sun World Java, May 20, 1995, Sun World HotJava HotJava  The first Java-enabled Web browser

JDK Versions JDK 1.02 (1995) JDK 1.02 (1995) JDK 1.1 (1996) JDK 1.1 (1996) Java 2 SDK v 1.2 (a.k.a JDK 1.2, 1998) Java 2 SDK v 1.2 (a.k.a JDK 1.2, 1998) Java 2 SDK v1.3 (a.k.a JDK 1.2, 2000) Java 2 SDK v1.3 (a.k.a JDK 1.2, 2000) Java 2 SDK v1.4 (Dec. 2001) Java 2 SDK v1.4 (Dec. 2001) Java 2 SDK v1.5 (June 2003 ??) Java 2 SDK v1.5 (June 2003 ??)

Java Development Tools Sun JDK Sun JDK Inprise JBuilder (RAD) Inprise JBuilder (RAD) Microsoft Visual J++ Microsoft Visual J++ Symantec Café (RAD) Symantec Café (RAD) Rouge Wave JFactory Rouge Wave JFactory Sun Java Workshop Sun Java Workshop IBM Visual Age for Java (RAD) IBM Visual Age for Java (RAD)

Install JBuilder and Samples Install JBuilder Install JBuilder Install Sample Programs Install Sample Programs Setup JDK environment Setup JDK environment  Set classpath=%classpath%;c:\jbbook  Set path=%path%;c:\jdk1.2.2\bin Check Java Home: Check Java Home: 

Getting Started with Java Programming A Simple Java Application A Simple Java Application Compiling Programs Compiling Programs Executing Applications Executing Applications A Simple Java Applet A Simple Java Applet Viewing Java Applets Viewing Java Applets Applications vs. Applets Applications vs. Applets

A Simple Application Example 1.1 //This application program prints Welcome //to Java! public class Welcome { public static void main (String[] args) public static void main (String[] args) { System.out.println("Welcome to Java!"); System.out.println("Welcome to Java!"); }} RunSource

Compiling Programs On command line On command line  javac file.java

Executing Applications On command line On command line  java classname

Example javac Welcome.java java Welcome output:...

A Simple Applet Example 1.2 /* This is an example of Java applets */ import java.awt.Graphics; public class WelcomeApplet extends java.applet.Applet { extends java.applet.Applet { public void paint (Graphics g) { public void paint (Graphics g) { g.drawString("Welcome to Java!",10,10); g.drawString("Welcome to Java!",10,10); }} Source

Creating an HTML File <body> <applet code="WelcomeApplet.class" width = 100 height = 40> width = 100 height = 40></applet></body></html>

Viewing Java Applets

Applet Viewer Utility appletviewer htmlfile.html Example: appletviewer WelcomeApplet.html Run Applet Viewer

Applications vs. Applets Similarities Similarities Differences Differences

Security Restrictions on Applets Applets are not allowed to read from, or write to, the file system of the computer viewing the applets. Applets are not allowed to read from, or write to, the file system of the computer viewing the applets. Applets are not allowed to run any programs on the browser’s computer. Applets are not allowed to run any programs on the browser’s computer. Applets are not allowed to establish connections between the user’s computer and another computer except with the server where the applets are stored. Applets are not allowed to establish connections between the user’s computer and another computer except with the server where the applets are stored.