Get Started: Suzana/Java II-Chapt2

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 6

Module 1

Get Started

Suzana/Java II-Chapt2
Objectives

 Download and install the Java Development Kit


(JDK)
 Compile and run Java program in command line
window and IDE

Suzana/Java II-Chapt2
Download and install the JDK

• The Java Development Kit (JDK) is a collection of,


programs to help developers compile, run and
debug Java program. (not as good as IDE)
• The latest version of JDK can be downloaded from
Sun Java website stated below:
java.sun.com

• Once downloaded, install it simply by running the


exe program that you have downloaded(double-
clik on the icon that was placed on your desktop)

Suzana/Java II-Chapt2
System PATH variable

• It takes about a minute to install. Confirm all the


suggested alternatives during the installation.
• The normal installation (Microsoft Windows) would
be into a new folder on your C: drive
• If the system does not know where the javac
command is, either the JDK is not properly
installed or the system does not know where it is
installed.
• You may amend the system PATH variable so that
it include the JDK into the path by typing this DOS
command: set path=c:\j2sdk1.4.2_12\bin; %path%

Suzana/Java II-Chapt2
Compile and run Java program
Welcome.java (using any text editor)

1. public class Welcome


2. { public static void main(String[] args)
3. { System.out.println(“Welcome to Java !”);
4. }
5. }

compile Welcome.java run Welcome.java

output

Suzana/Java II-Chapt2
Compile and run Java program (cont)

• You may use any Java development tools (IDE) to


develop, test and debug your program.
• Major development tools are :
- JBuilder by Borland
- NetBeans Open Source by Sun
- Sun One by Sun
- Eclipse Open Source by IBM

Suzana/Java II-Chapt2

You might also like