George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 3.

Slides:



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

In Review JAVA C++ GUIs - Windows Webopedia.com.
1 More on Applets Overview l Changing Colors l Changing Fonts & Styles l Applet Life-Cycle l Input using Dialog Window l Input using HTML parameters l.
PHY-102 SAPIntroductory GraphicsSlide 1 Introductory Graphics In this section we will learn how about how to draw graphics on the screen in Java:  Drawing.
LAB SESSION 7 Graphical user interface Applet fundamentals Methods in applets Execution of an applet Graphics class.
Applets Graphical Java programs Run inside web browser Platform-neutral Easy deployment--loads when needed Secure.
Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
Applets The objectives of this chapter are: To describe applets and their purpose To discuss embedding applets in HTML pages.
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
George Blank University Lecturer. Creating A Web Site at NJIT Professor Blank.
1 Introduction to Applets Overview l What is an Applet? l Steps for creating an applet l What is HTML? l Basic HTML tags l Drawing Simple Graphical shapes.
18-Jun-15 Applets. 2 An applet is a program that is typically embedded in a Web page and can be run from a browser You need special HTML in the Web page.
CASE STUDY: Applet Development with GUI and Client-side File Input Arkadiusz Edward Komenda.
28-Jun-15 Applets. 2 An applet is a program that is typically embedded in a Web page and can be run from a browser You need special HTML in the Web page.
J2EE Java 2 Enterprise Edition. Relevant Topics in The Java Tutorial Topic Web Page JDBC orial/jdbc
Lab 1 Instructor: Jolanta Soltis.
Helpful tips for working with NJIT University Computing Systems for Homework and projects Rafael Orta, Prashanth Sanagavarapu and George Blank.
Program Design With Methods And Graphics / Chapter 4 1 Abstract Window Toolkit.
PHY281Introduction to JavaSlide 1 Introduction to Java In this section we will learn how how to use Java and write our first Java Applet:  The Java Development.
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 2 Creating a Java Application and Applet.
Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.
Java Programming, 3e Concepts and Techniques Chapter 2 - Part 2 Creating a Java Application and Applet.
Applets Chapter 17.  Java’s big splash onto the scene came in the mid 90’s. The people at Sun Microsystems had managed to work java programs into Web.
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
Learn about the types of Graphics that are available Develop a basic Graphics applet Develop a basic Graphics application Review the Java API and use.
Applets and Frames CS 21a: Introduction to Computing I First Semester,
Chapter 17: Applets, Images, and Sound. Objectives Learn about applets Write an HTML document to host an applet Use the init() method Work with JApplet.
Putting Applets into Web Pages.  Two things are involved in the process of putting applets onto web pages ◦ The.class files of the applet ◦ The html.
Chapter 8 Introduction to HTML and Applets Fundamentals of Java.
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
POS 406 Java Technology And Beginning Java Code
The Joy of Programming (also known as) Introduction to Object-Oriented Programming.
CS 3131 Introduction to Programming in Java Rich Maclin Computer Science Department.
Java Tutorial Ethan New York University.
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.
Java Applets 1. What is an applet? An applet is a small Java program that is typically embedded in a Web page and can be run using the applet viewer or.
CSC 205 – Java Programming II Applet. Types of Java Programs Applets Applications Console applications Graphics applications Applications are stand-alone.
Program that runs in appletviewer (test utility for applets) Web browser (IE, Communicator) Executes when HTML (Hypertext Markup Language) document containing.
Java applets. Outline What is Java? Java Applications Java Applets Java Applets Securities Summary.
CS 7: Introduction to Computer Programming Java and the Internet Sections ,2.1.
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.
CSE S. Tanimoto Java Introduction 1 Java A Programming Language for Web-based Computing with Graphics.
Applets and Frames. Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved L14: GUI Slide 2 Applets Usually.
Overview of Form and Javascript fundamentals. Brief matching exercise 1. This is the software that allows a user to access and view HTML documents 2.
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.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
1 Applets are small applications that are accessed on an Internet server, transported over the internet, automatically installed and run as a part of web.
Creating a Java Application and Applet
Applets. 9/04/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved L12: Applets Slide 2 Applets Usually.
CSC Java Programming, Fall, 2008 August 28, 2008, class 2 Tuesday, September 2 uses Monday’s schedule!
Introduction to 1. What is Java ? Sun Microsystems Java is a programming language and computing platform first released by Sun Microsystems in The.
CSE S. Tanimoto Java Introduction 1 Java A Programming Language for Web-based Computing.
Applications Active Web Documents Active Web Documents.
A Programming Language for Web-based Computing with Graphics
Introduction to Advanced Java Programming
Introduction to.
Chapter Two Applet vs. Application
Distributed Computing, M. L. Liu
Distributed Computing, M. L. Liu
Java Applets.
Java applets 1/3/2019.
A Programming Language for
Handout-14 Applets and Graphics
Review of Previous Lesson
G6DICP - Lecture 27 Java Applets.
A Programming Language for
A Brief History January 1996: first official release JDK 1.0
Presentation transcript:

George Blank University Lecturer

CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 3

Chapter Overview Chapter 3 is an introduction to the Java language. Java is available in various subsets of the language so that different editions can serve uses ranging from supporting large enterprise application distributed over many systems to small embedded controllers running devices such as a home thermostat and even smart cards. Understand the features of the language, the various editions of Java, the run-time architecture, applications and applets.

Editions for this course This course is based on the Java 2 Standard Edition (J2SE), version 1.7 or later. If you choose to do a project from chapter 12, you may wish to use the Java 2 Enterprise Edition (J2EE) instead. You should be able to give a short explanation of the difference between the various editions of Java.

Run-time Architecture The text has a good, concise basic explanation of the Java run-time architecture (Section 3.2). It is important to understand this material. I have discovered that many employers have been very concerned with security, so study and understand the supplemental lecture on Java Security as well.

Getting Started Most common problems in Java development come from setting up the environment, especially the classpath.

Hello From Venus Code /* * Copyright (c) , Xiaoping Jia. All Rights Reserved. */ import java.awt.*; import java.applet.Applet; public class HelloFromVenus extends Applet { public void paint(Graphics g) { Dimension d = getSize(); g.setColor(Color.black); g.fillRect(0,0,d.width,d.height); g.setFont(new Font("Helvetica", Font.BOLD, 24)); g.setColor(new Color(255, 215, 0)); // gold color g.drawString("Hello From Venus!", 40, 25); g.drawImage(getImage(getCodeBase(), "Venus.gif"), 20, 60, this); }

Programming Problems Be familiar with the common problems and solutions on page 72 of the text. The primary means of technical support in this class will be self help from your classmates in the Technical Support thread on Moodle. You must learn to describe your problem well. You will also be expected to become familiar with the Java Documentation.

Most common problem in Java - Setting Environment You can set the class path for Java from the operating system with set classpath= {your class location} In most Windows systems, you can search Help for “environment variables” to find out how to set your classpath.

Other common problems The command to compile is javac {yourfilename}.java On AFS, you cannot connect to afs.njit.edu. You must specify a specific host between afsaccess1.njit.edu and afsacess4.njit.edu. Typing java – version will tell you what version of Java is currently active on your system. If you have multiple versions installed, you might have problems.

Works on Windows, not UCS If your program works in Windows, but not on Unix or OSX: Programs loaded over a network cannot access files and libraries on the local machine without policy files, signed jars, or security managers. Windows allows spaces in file names. Unix requires them to be filled. (Use %20 in HTML) Unix requires shorter filenames. Unix and Java are case sensitive, Windows ignores case, so MyFile.Class = myfile.class. Windows allows \ in pathnames. Unix requires /. If you neet to run and applet, Appletviewer is less restrictive than browsers.

Some useful links at NJIT This is the main help site: If you use a Virtual Private Network get software and installation instructions here:

Bibliography Be especially familiar with the documentation accessed from the Reference menu on the left side of this page. This is also where you can download Java. Jia, Xiaoping, Object Oriented Software Development Using Java. Addison Wesley, 2003