SlideShare a Scribd company logo
1 of 1
Download to read offline
Obtaining the Java Development Kit
Now that the theoretical underpinning of Java has been explained, it is time to start writing
Java programs. Before you can compile and run those programs, however, you must have a Java
development system installed on your computer. The one used by this book is the standard
JDK (Java Development Kit), which is available from Sun Microsystems. Several other Java
development packages are available from other companies, but we will be using the JDK
because it is available to all readers. It also constitutes the final authority on what is and isn’t
proper Java. At the time of this writing, the current release of the JDK is the Java 2 Platform
Standard Edition version 5 (J2SE 5). Because J2SE 5 contains many new features that are not
supported by earlier versions of Java, it is necessary to use J2SE 5 (or later) to compile and run
the programs in this book.
The JDK can be downloaded free of charge from www.java.sun.com. Just go to the
download page and follow the instructions for the type of computer that you have. After you
have installed the JDK, you will be ready to compile and run programs. The JDK supplies two
primary programs. The first is javac.exe, which is the Java compiler. The second is java.exe,
which is the standard Java interpreter, and is also referred to as the application launcher.
One other point: the JDK runs in the command prompt environment. It is not a windowed
application.
CRITICAL SKILL


1.6 A First Simple Program
Let’s start by compiling and running the short sample program shown here.
/*
This is a simple Java program.
Call this file Example.java.
*/
class Example {
// A Java program begins with a call to main().
public static void main(String args[]) {
System.out.println("Java drives the Web.");
}
}
You will follow these three steps:
1. Enter the program.
2. Compile the program.
3. Run the program.

More Related Content

What's hot

Setup Build & Deploy with Jenkins CI
Setup Build & Deploy with Jenkins CISetup Build & Deploy with Jenkins CI
Setup Build & Deploy with Jenkins CIwalming
 
Lecture android best practices
Lecture   android best practicesLecture   android best practices
Lecture android best practiceseleksdev
 
Best java courses in navi mumbai best classes for java in navi mumbai-java cl...
Best java courses in navi mumbai best classes for java in navi mumbai-java cl...Best java courses in navi mumbai best classes for java in navi mumbai-java cl...
Best java courses in navi mumbai best classes for java in navi mumbai-java cl...anshkhurana01
 
Quality Assurance using the Eclipse IDE
Quality Assurance using the Eclipse IDEQuality Assurance using the Eclipse IDE
Quality Assurance using the Eclipse IDEEduard Moraru
 
Java Development EcoSystem
Java Development EcoSystemJava Development EcoSystem
Java Development EcoSystemAlex Tumanoff
 
Core java environment setup and details
Core java environment setup and detailsCore java environment setup and details
Core java environment setup and detailse-visionlabs
 
Ci jenkins maven svn
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svnAnkur Goyal
 
Android Architecture Components
Android Architecture ComponentsAndroid Architecture Components
Android Architecture ComponentsDarshan Parikh
 
Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)QA Programmer
 
What's new in Eclipse Mars
What's new in Eclipse MarsWhat's new in Eclipse Mars
What's new in Eclipse MarsLakshmi Priya
 

What's hot (20)

Setup Build & Deploy with Jenkins CI
Setup Build & Deploy with Jenkins CISetup Build & Deploy with Jenkins CI
Setup Build & Deploy with Jenkins CI
 
Lecture android best practices
Lecture   android best practicesLecture   android best practices
Lecture android best practices
 
Best java courses in navi mumbai best classes for java in navi mumbai-java cl...
Best java courses in navi mumbai best classes for java in navi mumbai-java cl...Best java courses in navi mumbai best classes for java in navi mumbai-java cl...
Best java courses in navi mumbai best classes for java in navi mumbai-java cl...
 
Quality Assurance using the Eclipse IDE
Quality Assurance using the Eclipse IDEQuality Assurance using the Eclipse IDE
Quality Assurance using the Eclipse IDE
 
Selenium using C# by Yogesh Kumar
Selenium using C# by  Yogesh KumarSelenium using C# by  Yogesh Kumar
Selenium using C# by Yogesh Kumar
 
App c
App cApp c
App c
 
Jenkins
JenkinsJenkins
Jenkins
 
Extending NetBeans IDE
Extending NetBeans IDEExtending NetBeans IDE
Extending NetBeans IDE
 
Vsts ci cd-java
Vsts ci cd-javaVsts ci cd-java
Vsts ci cd-java
 
Java Development EcoSystem
Java Development EcoSystemJava Development EcoSystem
Java Development EcoSystem
 
Continuous integration with Jenkins
Continuous integration with JenkinsContinuous integration with Jenkins
Continuous integration with Jenkins
 
Core java environment setup and details
Core java environment setup and detailsCore java environment setup and details
Core java environment setup and details
 
java new technology
java new technologyjava new technology
java new technology
 
Gradle
GradleGradle
Gradle
 
Chapter 1 java
Chapter 1 java Chapter 1 java
Chapter 1 java
 
Ci jenkins maven svn
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svn
 
Android Architecture Components
Android Architecture ComponentsAndroid Architecture Components
Android Architecture Components
 
Java projectfinal
Java projectfinalJava projectfinal
Java projectfinal
 
Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)
 
What's new in Eclipse Mars
What's new in Eclipse MarsWhat's new in Eclipse Mars
What's new in Eclipse Mars
 

Similar to simple Java Hello

Similar to simple Java Hello (20)

Java part 1
Java part 1Java part 1
Java part 1
 
1 about eclipse
1 about eclipse1 about eclipse
1 about eclipse
 
1 about eclipse
1 about eclipse1 about eclipse
1 about eclipse
 
Introduction to java technology
Introduction to java technologyIntroduction to java technology
Introduction to java technology
 
1 about eclipse
1 about eclipse1 about eclipse
1 about eclipse
 
Hello World Program in Java .pdf
Hello World Program in Java .pdfHello World Program in Java .pdf
Hello World Program in Java .pdf
 
Class 1
Class 1Class 1
Class 1
 
Introduction to java programming tutorial
Introduction to java programming   tutorialIntroduction to java programming   tutorial
Introduction to java programming tutorial
 
Learn java in one day and learn it well 2016 jamie chan
Learn java in one day and learn it well 2016   jamie chanLearn java in one day and learn it well 2016   jamie chan
Learn java in one day and learn it well 2016 jamie chan
 
Setting Up Java Environment | PDF
Setting Up Java Environment | PDFSetting Up Java Environment | PDF
Setting Up Java Environment | PDF
 
J introtojava1-pdf
J introtojava1-pdfJ introtojava1-pdf
J introtojava1-pdf
 
22412_1_1_1_P_603c5bf161f61_File.pdf
22412_1_1_1_P_603c5bf161f61_File.pdf22412_1_1_1_P_603c5bf161f61_File.pdf
22412_1_1_1_P_603c5bf161f61_File.pdf
 
JRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVAJRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVA
 
JAVA CORE
JAVA COREJAVA CORE
JAVA CORE
 
CORE JAVA
CORE JAVACORE JAVA
CORE JAVA
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Basic difference between jdk,jre,jvm in advance java course
Basic difference between jdk,jre,jvm in advance java courseBasic difference between jdk,jre,jvm in advance java course
Basic difference between jdk,jre,jvm in advance java course
 
JAVA First Day
JAVA First DayJAVA First Day
JAVA First Day
 
Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)
 
Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)
 

Recently uploaded

diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....Ritu480198
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17Celine George
 
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...Krashi Coaching
 
How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17Celine George
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code ExamplesPeter Brusilovsky
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...Nguyen Thanh Tu Collection
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxMarlene Maheu
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project researchCaitlinCummins3
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptxPoojaSen20
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFVivekanand Anglo Vedic Academy
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi RajagopalEADTU
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...Nguyen Thanh Tu Collection
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...EduSkills OECD
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxMohamed Rizk Khodair
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptxPoojaSen20
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxheathfieldcps1
 

Recently uploaded (20)

Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
 
How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptx
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptx
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
 

simple Java Hello

  • 1. Obtaining the Java Development Kit Now that the theoretical underpinning of Java has been explained, it is time to start writing Java programs. Before you can compile and run those programs, however, you must have a Java development system installed on your computer. The one used by this book is the standard JDK (Java Development Kit), which is available from Sun Microsystems. Several other Java development packages are available from other companies, but we will be using the JDK because it is available to all readers. It also constitutes the final authority on what is and isn’t proper Java. At the time of this writing, the current release of the JDK is the Java 2 Platform Standard Edition version 5 (J2SE 5). Because J2SE 5 contains many new features that are not supported by earlier versions of Java, it is necessary to use J2SE 5 (or later) to compile and run the programs in this book. The JDK can be downloaded free of charge from www.java.sun.com. Just go to the download page and follow the instructions for the type of computer that you have. After you have installed the JDK, you will be ready to compile and run programs. The JDK supplies two primary programs. The first is javac.exe, which is the Java compiler. The second is java.exe, which is the standard Java interpreter, and is also referred to as the application launcher. One other point: the JDK runs in the command prompt environment. It is not a windowed application. CRITICAL SKILL 1.6 A First Simple Program Let’s start by compiling and running the short sample program shown here. /* This is a simple Java program. Call this file Example.java. */ class Example { // A Java program begins with a call to main(). public static void main(String args[]) { System.out.println("Java drives the Web."); } } You will follow these three steps: 1. Enter the program. 2. Compile the program. 3. Run the program.