Introduction to Java IEEM241 Routing and Fleet Management Feb 3, 2005.

Slides:



Advertisements
Similar presentations
COP 3530 JDK Environment Variables. COP 3530 JDK Environment Variables Environment Variables Environment variables are a set of dynamic values that can.
Advertisements

1 eclipse Tips. 2 What is eclipse? Eclipse is a popular IDE (Integrated Development Environment) that we will use to create, compile, execute, and test.
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.
CS115 HOW TO INSTALL THE JAVA DEVELOPMENT KIT (JDK)
Go to the link ( as shown, then choose downloads.
Installing JDK Vijayan Sugumaran Department of DIS Oakland University.
Tutorial 1 Introduction to Java Programming Bo Chen Department of Computer Science.
Lab 1 Instructor: Jolanta Soltis.
How to install Java CSC 2310 D M Rasanjalee. Steps 1.Download Java 2.Install Java 3.Update Path environmental variable 4.Verify Installation.
Update the PATH variable Trying to run the command: “javac Ex1.java” you’ve may encountered the error: “javac is not recognized as internal or external.
Command Console Tutorial BCIS 3680 Enterprise Programming.
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.
Lecture 1: Overview of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++ Designed.
CS0007: Introduction to Computer Programming Setting Up Java.
COMPILING JAVA PROGRAM USING JDK COMMAND LINE WINDOWS PLATFORM.
SERVLETS.
Tutorial on Visual Studio express Introduction Visual Studio Express Editions are a new line of Microsoft development Tools. This line of products.
Installing and Configuring Tomcat A quick guide to getting things set up on Windows.
Tutorial 11 Installing, Updating, and Configuring Software
IPT2 user interface customization and locale translation Alan Yang, Kun Chi Lai, Jim Hsu Biodiversity Research Center, Academia Sinica.
1 Mobile Computing Set Up Copyright 2015 by Janson Industries.
CS Tutorial 1 Getting Started with Visual Studio 2012 (Visual Studio 2010 are no longer available on MSDNAA, please choose Visual Studio 2012 which.
Tutorial 1. Q1: Compare and contrast between multiprocessors and multicore Multicore – Dual-core processor has two cores (e.g. AMD Phenom II X2, Intel.
Chapter 1© copyright Janson Industries Java ▮ Java programming concepts ▮ Downloading the JDK ▮ Java coding and executing example This presentation.
UCSC All rights reserved. No part of this material may be reproduced and sold. 1 IT1202-Fundamentals Of Programming (Using JAVA) Interacting with.
How to Tag a Corpus Using Stanford Tagger. Accuracy All tokens: 97.32% Unknown words: 90.79%
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.
Introduction to Engineering MATLAB – 6 Script Files - 1 Agenda Script files.
POS 406 Java Technology And Beginning Java Code
( ) 1 ISYE 7210—Fall 2005 Design of Real-Time Interactive Simulations (in Java) Initial Notes Christine M. Mitchell Director & Professor Center for.
COP 3330 Notes 1/12. Today's topics Downloading Java and Eclipse Hello World Basic control structures Basic I/O Strings.
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.
 Pearson Education, Inc. All rights reserved Introduction to Java Applications.
Setting Up Eclipse. What is Eclipse? Eclipse is a free, downloadable software that allows us to create, compile, and run JAVA programs.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
Preliminaries CS 310: Object-oriented Programming Java API.
EIE375 BlueJ: Getting Started Dr Lawrence Cheung.
How to create and install packages in R Presenter: Roman Jandarov
DOS and the Command Line CS 21a: Introduction to Computing I Department of Information Systems and Computer Science Ateneo de Manila University.
Installing JDK Vijayan Sugumaran Department of DIS Oakland University.
Tool Install How to download & install Java 6 & Eclipse updated version based on Dr. G. L. Ray’s slides.
DOS and the Command Line CS 21a: Introduction to Computing I First Semester,
Java Programming, Second Edition Appendix A Working with Java SDK 1.4.
How to Run Java Applications using the Windows Command Prompt. Julian Falasca May 11 th, 2010 ENGL 393.
MySQL Getting Started BCIS 3680 Enterprise Programming.
File and Folder CLI Commands 12/24/ Agenda Overview of OS functions and the SHELL Internal v External Commands Command History Making & Modifying.
Windows Installation Tutorial NASA ARSET For Python help, contact: Justin Roberts-Pierel
Enabling Grids for E-sciencE Software installation and setup Viet Tran Institute of Informatics Slovakia.
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.
1 Getting Started with C++ Part 1 Windows. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Microsoft.
How to Execute TSR Program. Install Borland C++ Download Borland C++ from LMS – oads/BORLANDC.rarhttp://vulms.vu.edu.pk/Courses/CS609/Downl.
Java On the ENB 116 Computers The JDK is now available on the ENB 116 computers. You can use a classroom computer rather than your own laptop or CIRCE.
Windows Installation Tutorial NASA ARSET For Python help, contact: Justin Roberts-Pierel
Tutorial for Modelsim 1 Installation Download the Modelsim Student Edition: Follow the.
 CSC 215 : Procedural Programming with C C Compilers.
CS 201 Lecture 1 (b) Using an IDE Tarik Booker CS 201: Introduction to Programming California State University, Los Angeles.
CACI Proprietary Information | Date 1 Upgrading to webMethods Product Suite Name: Semarria Rosemond Title: Systems Analyst, Lead Date: December 8,
CompSci 230 S Programming Techniques
CSC 215 : Procedural Programming with C
A Short DOS Presentation
Programming without BlueJ Week 12
CENG2400 Tutorial 1 Keil IDE CENG2400 tutorial 1 v.7a.
Introduction to Java Dept. Business Computing University of Winnipeg
Run Java file with Window cmd
CS115 HOW TO INSTALL THE JAVA DEVELOPMENT KIT (JDK)
Advanced Programming in Java
Windows Installation Tutorial
Review of Previous Lesson
Presentation transcript:

Introduction to Java IEEM241 Routing and Fleet Management Feb 3, 2005

Agenda Installing and set PATH environment variables First Cup of Java –HelloWorldApp.java Java basics File I/O Reference

Installing Java In IS Lab –WinXP: all are installed with the J2SE Software Development Kit (JDK) –Win98: Check C:\ drive, whether there is a folder named something like j2sdk?????, i.e. c:\j2sdk1.4.2_06 If not, double click the installation file on D:\ drive. The filename is something like j2sdk-1_4_2_06- windows-i586-p.exe.

Installing Java (cont’d) For your own PC –Download Download J2SE SDK(JDK) In UST, 1_4_2_04-windows-i586-p.exehttp:// /ieem241/j2sdk- 1_4_2_04-windows-i586-p.exe

Update the PATH environment variable For Windows 2000/XP: –Start  Settings  Control Panel  double-click System ->Advanced tab  Environment Variables –Look for "Path" in the User Variables and System Variables. –Add c:\j2sdk1.4.2_ \bin; at the end of PATH –Click "Set", "OK" or "Apply –Run new Command Prompt window to take effect

Update the PATH environment variable (cont’d) For Windows 98: –In IS Lab Open a command window Type set PATH=%PATH%; c:\j2sdk1.4.2_ \bin; Notice: DO NOT close this window –For your own PC Edit autoexec.bat in C: Add c:\j2sdk1.4.2_ \bin after PATH = Save the file and reboot the system (In IS Lab we cannot do this. All files on C:\ will be recovered after rebooting.)

First Cup of Java: create source file –Use notepad or other java developer software, type in the following code Save as HelloWorldApp.java in a directory Notice 1: File name should be the same as the class name Notice 2: Case Sensitive, HelloWorldApp  helloworldapp

First Cup of Java: Compile the source File Start a command window –For WinXP/2000, start a new command prompt window –For Win98, use the same window that you set the PATH environment variable, or open a new one and reset the PATH Change to the directory which you save the.java file (e.g cd c:\java) Type javac HelloWorldApp.java Type dir, you can see a file called “ HelloWorldApp.class ” was created

First Cup of Java: Running it! –In the same directory, enter at the prompt: java HelloWorldApp –Now you should see:

First Cup of Java: Errors –Bad command or file name(in Win98) –'javac' is not recognized as an internal or external command, operable program or batch file. (in WinXP) –Exception in thread “main” java.lang.NoClassDefFoundError –Check if you have typed a wrong file name –Check the PATH environment variable –Check whether the file is in the current directory

Java Basics: comments –Comment Type Document comments /** */ /* text */ and //

Java Basics: Class Each.java file should contain a class with the same name as the file name.

Java Basics: main The main method –Meaningful when public class if there are more than 1 class in this file –Should be verbatim in this form

Read & Write File Notice 1: “import” is like “#include” in C++ Notice 2: DO NOT forget the try-catch clause Read & write a file line by line package

Read & Write File Can only read/write files character by character

In Class Exercises Bubble Sorting Generating a simple report Generating a calendar All source files can be downloaded from If your PC does not have UltraEdit-32 installed, please download from

Reference –The Java Tutorial ation/download.html –Bruce Eckel, Thinking in Java, 3 rd Edition –Java course website