UCSC 2003. All rights reserved. No part of this material may be reproduced and sold. 1 IT1202-Fundamentals Of Programming (Using JAVA) Interacting with.

Slides:



Advertisements
Similar presentations
Using Java without BlueJ BlueJ projects A BlueJ project is stored in a directory on disk. A BlueJ package is stored in several different files.
Advertisements

Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
Object Oriented Programming in Java George Mason University Fall 2011
Object Orientated Programming
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.
1 Fall 2008ACS-1903 Chapter 1 Topics Java History Java Programs Why Program? Computer Systems: Hardware and Software Programming Languages What Is a Program.
How to Create a Java program CS115 Fall George Koutsogiannakis.
Java Programming Working with TextPad. Using TextPad to Work with Java This text editor is designed for working with Java You can download a trial version.
01 Introduction1June Introduction CE : Fundamental Programming Techniques.
PowerPoint 2002 Linking Video in Presentation and Delivering Presentation on the Road.
Introduction to Java ISYS 350. A Brief History Sun Microsystems released this language in 1996 – Versions: 1.0 – 1.6 Java Development Kit, JDK – Standard.
Using Java without BlueJ Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling BlueJ projects A BlueJ.
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.
Using Java without BlueJ Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling BlueJ projects A BlueJ.
Module 6 Windows 2000 Professional 6.1 Installation 6.2 Administration/User Interface 6.3 User Accounts 6.4 Managing the File System 6.5 Services.
Using Java without BlueJ
Lab 1 Instructor: Jolanta Soltis.
Introduction to Java.
Installing Windows XP Professional Using Attended Installation Slide 1 of 41Session 2 Ver. 1.0 CompTIA A+ Certification: A Comprehensive Approach for all.
Introduction to the JDK Java for Computational Finance
CS0007: Introduction to Computer Programming Setting Up Java.
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
Marlene Galea.  The JDK (Java Development Kit)  An IDE (Integrated Development Environment) ◦ Different IDEs include:  JCreator  NetBeans  BlueJ.
The Basic Java Tools A text editor to write Java program source code. A compiler to translate source code into bytecode. An interpreter to translate.
public static void main (String[] args)
JSP and Servlets Lecture notes by Theodoros Anagnostopoulos.
Introduction to Java Tonga Institute of Higher Education.
DB2 (Express C Edition) Installation and Using a Database
Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.
CS413: Java Programming language Applications Applets
M1G Introduction to Programming 2 4. Enhancing a class:Room.
Chapter 1: Creating Java Programs
(C) 2010 Pearson Education, Inc. All rights reserved.  Java programs normally go through five phases  edit  compile  load  verify  execute.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Fundamentals of Java.  Explain the structure of a Java class  List and explain steps to write a Java program  Identify the benefits of NetBeans IDE.
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.
FTP Server and FTP Commands By Nanda Ganesan, Ph.D. © Nanda Ganesan, All Rights Reserved.
© 2005 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures for Java William H. Ford William R. Topp Appendix E The EZJava.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
Jaeki Song ISQS6337 JAVA Lecture 03 Introduction to Java -The First Java Application-
Java Basics - Prashant Nagaraddi. Features of Java n Java syntax is similar to C/C++ but there are many differences too n Java is strongly typed like.
© 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
Intro and Review Welcome to Java. Introduction Java application programming Use tools from the JDK to compile and run programs. Videos at
Java Programming, Second Edition Chapter One Creating Your First Java Program.
COP 3330 Notes 1/12. Today's topics Downloading Java and Eclipse Hello World Basic control structures Basic I/O Strings.
Introduction to Eclipse CSC 216 Lecture 3 Ed Gehringer Using (with permission) slides developed by— Dwight Deugo Nesa Matic
The Joy of Programming (also known as) Introduction to Object-Oriented Programming.
Object Oriented Programming Lecture 3. Introduction  In discussing Java, some items need to be clarified  The Java programming language  The Java virtual.
EIE375 BlueJ: Getting Started Dr Lawrence Cheung.
Mini University July, 2005 A Little Taste of Java (but don’t tell your folks) (they might think there’s caffeine involved)
Copyright © Mohamed Nuzrath Java Programming :: Syllabus & Chapters :: Prepared & Presented By :: Mohamed Nuzrath [ Major In Programming ] NCC Programme.
22-July-2002cse142-13B-Development © 2002 University of Washington1 Development Tools CSE 142, Summer 2002 Computer Programming 1
Java Programming, Second Edition Appendix A Working with Java SDK 1.4.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
1 Installing Java on Your PC. Installing Java To develop Java programs on your PC: Install JDK (Java Development Kit) Add the directory where JDK was.
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter One An Introduction to Visual Basic 2008.
©2016 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. CSC 110 – INTRO TO COMPUTING - PROGRAMMING Overview of Programming.
3/5/2002e-business and Information Systems1 Java Java Java Virtual Machine (JVM) Java Application Program Interface (API) HW Kernel API Application Programs.
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
CS 201 Lecture 1 (b) Using an IDE Tarik Booker CS 201: Introduction to Programming California State University, Los Angeles.
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
Introduction to Java Import Scanner class to use in our program
Programming without BlueJ Week 12
Java programming lecture one
Introduction to Java Dept. Business Computing University of Winnipeg
Java Applets.
Introduction CSC 111.
Review of Previous Lesson
Presentation transcript:

UCSC All rights reserved. No part of this material may be reproduced and sold. 1 IT1202-Fundamentals Of Programming (Using JAVA) Interacting with Java Programs Version 1.0

UCSC All rights reserved. No part of this material may be reproduced and sold. 2 Introduction to Java Development Kit (JDK) JDK provides core set of tools that are necessary to develop Professional Java applications These tools are discussed in detail later JDK tools are also written in Java. BIT

UCSC All rights reserved. No part of this material may be reproduced and sold. 3 BIT Introduction………… JDK is a set of command-line programs, text-based utilities that don’t make use of a graphical user interface. Programmers run each of the JDK’s utilities by typing java GetFunky.class This command tells the java program – the bytecode interpreter – to run a bytecode file called GetFunky.class (As you see later today, compiled Java programs all have the.class file extension)

UCSC All rights reserved. No part of this material may be reproduced and sold. 4 Introduction………… Windows 95 users must use the MS-DOS prompt command to open a window where commands can be typed.

UCSC All rights reserved. No part of this material may be reproduced and sold. 5 Introduction………. Installing the Java Development Kit JDK for different platforms available in a CD or can download from the web site: Windows Installation Before installing the JDK on your system make sure that no other Java development tools are installed.

UCSC All rights reserved. No part of this material may be reproduced and sold. 6 Installation………. To install the JDK on Windows, double-click the installation archive file or use the Start Run command from the Windows taskbar to find and run the file. After you see a dialog box asking whether you want to install JDK the JDK Setup Wizard is displayed. You can use this window to configure how the JDK is installed in your system. The default settings for this wizard should be fine for most users. The JDK is installed in a new folder with a name based on the version you’re downloading (such as \jdk1.2), unless you use the Browse button to select a different folder on your system.

UCSC All rights reserved. No part of this material may be reproduced and sold. 7 Installation……… The wizard will install the following JDK components: Program files Native Interface header files Tooldocs Demo files

UCSC All rights reserved. No part of this material may be reproduced and sold. 8 Installation………. Solaris Installation Sun’s Solaris version of the JDK can be installed on the following platforms: SPARC systems running Solaris 2.4 or higher x86 systems running Solaris 2.5 or higher

UCSC All rights reserved. No part of this material may be reproduced and sold. 9 Creating a source file Java applications are standalone Java programs that do not require a Web browser to run. Run them locally with your mouse or by typing the program name at a command line.

UCSC All rights reserved. No part of this material may be reproduced and sold. 10 Creating a source file Any plain text editor or text editor capable of saving in ASCII format can be used to create a Source file Examples are DOS EDIT, Notepad etc. Source File should be saved with a.java extension

UCSC All rights reserved. No part of this material may be reproduced and sold. 11 Creating………. If you are using Windows 95, 98 or NT, a text editor such as Notepad may add an extra.txt file extension to the filename of any Java source files you save. The Java compiler will only handle source files with the.java file extension. To avoid this problem place quotation marks around the filename when you are saving a source file.

UCSC All rights reserved. No part of this material may be reproduced and sold. 12 Creating……….

UCSC All rights reserved. No part of this material may be reproduced and sold. 13 Creating…………. Writing the program Choose the editor according to your choice & enter the Java program. class HelloDan { public static void main (String[] arguments) { System.out.println (“What’s your name?”); } } »After finish typing the program, save the file somewhere on your drive with the name HelloDan.java.

UCSC All rights reserved. No part of this material may be reproduced and sold. 14 Compiling & running the source file Compile the Source File First set the Java Environment Setting The Path In your Autoexec.bat file set the PATH and CLASS PATH as follows PATH …………;\C:\JDK1.3\BIN\…. Indicates any existing paths SET CLASSPATH =C:\JDK1.3\lib\classes.zip;.; BIT

UCSC All rights reserved. No part of this material may be reproduced and sold. 15 Compiling…………. Compiling and Running the Source File contd.. Assuming you saved your source file in myJavaPrg Directory C:\myJavaPrg>Javac Test.java Java Compiler Source File Name (ensure to use Same name as the class Name) Java Compiler will create a Java byte code file BIT

UCSC All rights reserved. No part of this material may be reproduced and sold. 16 Running Java Programs To execute byte code file C:\myJavaPrg>Java Test Java Interpreter Class Name Java Byte Code Interpreter Execute the Java Byte code class file BIT

UCSC All rights reserved. No part of this material may be reproduced and sold. 17 Java byte code file Bytecode is the Java virtual machine’s version of the machine code, the instructions it directly understands. The virtual machine known as Java interpreter or Java runtime.

UCSC All rights reserved. No part of this material may be reproduced and sold. 18 Java………. The virtual machine takes compiled Java programs & converts their instructions into commands, which known as byte code, can run on any platform & operating system that has a Java virtual machine.

UCSC All rights reserved. No part of this material may be reproduced and sold. 19 Java byte code interpreter Java code Java Compiler Java Bytecode (Platform Independent) Java Interpreter (Pentium) Java Interpreter (PowerPC)

UCSC All rights reserved. No part of this material may be reproduced and sold. 20 Java byte code Interpreter….. Source code, is the set of programming statements a programmer enters into a text editor when creating a program. Source code is compiled into bytecode so that it can be run by a Java virtual machine. The capability of a single bytecode file to run across platforms is crucial to what makes Java work on the World Wide Web, because the Web itself is platform-independent.