CSE 373 -- S. Tanimoto Java Introduction 1 Java A Programming Language for Web-based Computing with Graphics.

Slides:



Advertisements
Similar presentations
wwwcsif.cs.ucdavis.edu/~jacksoni
Advertisements

George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 3.
Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
Introduction to JAVA Vijayan Sugumaran School of Business Administration Oakland University Rochester, MI
Object Oriented Programming in Java George Mason University Fall 2011
Java Applet & JavaScript SNU OOPSLA Lab. October 2005.
Client Side Programming Using Java Applet Outcomes: You will be expected to know: – Java Applets and HTML file; –bytecode and platform independent programs;
Principles of Object-Oriented Software Development The language Java.
Course Map The Java Programming Language Basics Object-Oriented Programming Exception Handling Graphical User Interfaces and Applets Multithreading Communications.
WWW and Internet The Internet Creation of the Web Languages for document description Active web pages.
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
Java PAL.  Contains the development kit and the runtime environment ( aka the Java Virtual Machine )  Download Link:
Developing User Interfaces (DUI) Chris North cs3724: HCI.
Getting Started What is Java? A programming language –Fully buzzword-compliant: A simple, object oriented, distributed, interpreted, robust, secure,
1 CSC 551: Web Programming Spring 2004 Java Overview  Design goals & features  platform independence, portable, secure, simple, object-oriented, … 
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.
EE2E1. JAVA Programming Introduction Dr. Mike Spann
Introduction to Java CSIS 3701: Advanced Object Oriented Programming.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 16: Java Applets & AWT Fundamentals of Web Programming.
Programming Fundamentals 2: Background/ F II Objectives – –give a non-technical overview of Java Semester 2, Background.
Java Lecture 16: Dolores Zage. WWW n Was a method for distributing passive information n added forms and image maps n interaction was only a new way to.
JAVA APPLETS By: Ms. Humaira Siddiqui. Java and the Internet Java is considered to be a language well suited to be used in the internet. In contrast with.
Why Java? A brief introduction to Java and its features Prepared by Mithat Konar.
Introduction to Java CSIS 3701: Advanced Object Oriented Programming.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
Java Applets. 2 Introduction to Java Applet Programs  Applications are stand alone programs executed with Java interpreter executed with Java interpreter.
Module Overview n Module Title: OO Programming n Module Code: MIT3446 n Module Value: 3.0 n Duration: 15 weeks n Class-Contact Hours: Lecture15 hrs n Lab/Tutor30hrs.
POS 406 Java Technology And Beginning Java Code
1 Programming Fundamentals AITI-GP. 2 Introduction to Programming.
The Joy of Programming (also known as) Introduction to Object-Oriented Programming.
CS 3131 Introduction to Programming in Java Rich Maclin Computer Science Department.
Fundamentals of Web Publishing MIS 208-B LEC: T 08:15PM-10:05PM- ADM102 LAB: TH 08:15PM-10:05PM - ADM138 Andy Stokes.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
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.
CSC 205 – Java Programming II Applet. Types of Java Programs Applets Applications Console applications Graphics applications Applications are stand-alone.
COP2800 – Computer Programming Using JAVA University of Florida Department of CISE Spring 2013 Lecture 35 – Overview of Java Web Programming Webpage:
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
CSE S. Tanimoto Java Introduction 1 Java A Programming Language for Web-based Computing with Graphics.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Intro to Applets. Applet Applets run within the Web browser environment Applets bring dynamic interaction and live animation to an otherwise static HTML.
Lecture 1. Introduction to Programming and Java MIT- AITI 2003.
Chapter 4 Applets Cop Why Applets? WWW makes huge information available to anyone with web browser. Web server send web pages and images to your.
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.
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.
Java Computer Industry Lab. 1 Programming Java Java Basics Incheon Paik.
ITP 109 Week 2 Trina Gregory Introduction to Java.
Computer Science I Lab 1 ISMAIL ABUMUHFOUZ | CS 180.
Introduction to 1. What is Java ? Sun Microsystems Java is a programming language and computing platform first released by Sun Microsystems in The.
JAVA TRAINING IN NOIDA. JAVA Java is a general-purpose computer programming language that is concurrent, class-based, object-oriented and specifically.
Lesson 2: First Java Programs. 2.1 Why Java? Java is one of the most popular programming languages in the world. Java is a modern object-oriented programming.
CSE S. Tanimoto Java Introduction 1 Java A Programming Language for Web-based Computing.
 It is a pure oops language and a high level language.  It was developed at sun microsystems by James Gosling.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Applications Active Web Documents Active Web Documents.
A Programming Language for Web-based Computing with Graphics
Introduction to Java Dept. Business Computing University of Winnipeg
Distributed Computing, M. L. Liu
Getting Started ARCS Lab..
Distributed Computing, M. L. Liu
Java Applets.
A Programming Language for
CSC 551: Web Programming Spring 2004
CSC 551: Web Programming Spring 2004
F II 1. Background Objectives
Chap 1. Getting Started Objectives
A Programming Language for
A Brief History January 1996: first official release JDK 1.0
Presentation transcript:

CSE S. Tanimoto Java Introduction 1 Java A Programming Language for Web-based Computing with Graphics

CSE S. Tanimoto Java Introduction 2 Language Features of Java -- Garbage-collected -- Support for object-oriented programming -- Support for packages -- Compiles to intermediate code -- Intermediate code is then interpreted -- Built-in support for many data structures such as hash tables, vectors

CSE S. Tanimoto Java Introduction 3 Applets vs CGI Differences: Java supports client-side processing in Web via “Applets” HTTP GET/POST Web page Apache W.S. CGI program Browser HTTP GET Java class files Apache W.S. Browser/JVM Applet Exec. Client Side Server Side

CSE S. Tanimoto Java Introduction 4 More Features of Java More Differences: Security considerations, because of its web orientation: compulsory “try” and “catch” error handling. Stronger typing of variables than in, say, Lisp or Perl. Standard graphics API’s: the AWT and Swing.

CSE S. Tanimoto Java Introduction 5 Influences on Java C, C++: syntax of arithmetic and boolean expressions, need for safe pointer operations. Smalltalk, C++, CLOS: Object orientation Lisp: garbage collection, “bignums”

CSE S. Tanimoto Java Introduction 6 Java’s Web Support Applets: Java virtual machine can run in a browser. Safe pointers avoid segmentation faults and other dangerous errors. Security manager provides that applets don’t perform I/O to client hard disk. Applets permitted only limited upload communication (to the originating server). Standard networking package is provided.

CSE S. Tanimoto Java Introduction 7 Java’s Graphics AWT: The Abstract Windowing Toolkit is a package providing standard classes for building GUIs. Support for decoding GIF and JPEG image formats is built in. Java has used two slightly different event models for user interaction: JDK 1.0 (old) and JDK 1.1 (new). Java2D is a more advanced imaging package that’s made to work with Java 2.

CSE S. Tanimoto Java Introduction 8 Java’s Threads Java programs can contain multiple threads of control. This can permit parallel processing. This can permit logical separation of the program into code for concurrent processes. Threads are especially useful in animation within an applet. Run-time scheduling of threads is not completely platform independent.

CSE S. Tanimoto Java Introduction 9 Example Application class MyFirstApplication { public static void main(String[] args) { System.out.println("Hello CSE 373"); } To compile on a Unix system, type: javac MyFirstApplication.java Then to run it, type: java MyFirstApplication

CSE S. Tanimoto Java Introduction 10 Example Applet import java.applet.Applet; import java.awt.Graphics; public class MyFirstApplet extends Applet { public void paint(Graphics g) { g.drawString("Hello CSE 373!", 50, 25); } To compile on a Unix system, type: javac MyFirstApplet.java Then to run it, embed a reference to it in a web page...

CSE S. Tanimoto Java Introduction 11 Web Page with Applet Tag (works with Mozilla Firefox) A Simple Program So here is my first applet: <APPLET CODE=”MyFirstApplet.class” WIDTH=150 HEIGHT=25>

CSE S. Tanimoto Java Introduction 12 Logistics of Getting Started With Java Choose a place to work: Home, dorm, Math Sciences Computer Center (CSE 373’s designated lab), etc. If you need to, download and install JDK 1.4 using the link on our syllabus page. If you need to, download and install Eclipse from