SlideShare a Scribd company logo
2
Most read
5
Most read
12
Most read
JAVA PROGRAMMING
RAKHEE CHHIBBER
OUTLINE
• Downloading and Installation of JDK
• Setting path, compilation of program and execution of the
complied program
2 APPROACHES
• Hard work
• Smart work
HARD WORK VS SMART WORK
• Hard work - means that you have to do all the java path
establishment, creation of program, compilation and execution
of java program by you own.
• Smart Work – means the use of an IDE(Interacted Development
Environment) through which we can create java programs using
drag and drop facility.
• In this session, you will learn the installation, complilation and
execution of java program manually (hard work)
STEP -1 JDK INSTALLATION PROCESS
• For the JDK(Java Development Kit) installation first of all we have to go on
the oracle.com website and find the latest version of JDK.
• There is a link from where you can download the JDK latest version
https://www.oracle.com/java/technologies/javase-jdk15-downloads.html
Download the latest version and copy it in a folder named as java on your
drive like C drive/D drive or any other local drive now unzip the downloaded
file for example in this case e:java and find the path of javac which is a java
compiler. Generally it is available in bin folder of our jdk folder.
When you unzip the downloaded file you will find the JDK-15 folder in which
there will be a bin folder. Select the bin folder and copy the path which we will
require at the time of setting of path of our program to java library.
This will be
E:javajdk-15bin
STEP – 2 CREATION OF PROGRAM
• Create a folder in the drive of your choice on your computer
• Open any basic editor like NOTEPAD, NOTEPAD++, WORDPAR
or any other of your choice
• Write a program as given in the following slide and save it in
your java program folder as e:java program
public class a
{
public static void main(String
args[])
{
System.out.println("hello");
}
}Note : - Things to remember
• Java is a case sensitive language so please check the capital and small
letters used in this program
• When you save this program save it with the name as “class-name.java” for
example in the above code our class name is a so we have to save this
program with the name of “a.java”.
STEP 3 - SETTING THE PATH
• To compile our program we have to set a path to our java
complier and interpreter.
• Now you have to go in run and type cmd
• It will open a command prompt window as in the following
slides
Installation of java and program execution
Installation of java and program execution
STEP 3 - SETTING THE PATH – CONTD….
• Now get the location of javac.exe
• As you see there is a working directory is c:usershp but we have to
change to the java program folder.
• Now shift the drive as
• c:userhp>e:
• E:>cd “java progam”
• E:java program>
• Now type the path command as
• E:java program> set path=E:javajdk-15bin
This path is
the same
path which
weget in step
1
STEP 4 COMPLIALTION OF JAVA PROGRAM
• As soon as the path has been created now we have to execute our
java program using java complier(javac.exe) so type the following
command
E:java program>javac a.java
• Complier will display all the list of error so now you have to remove
all the error present in program. After the debugging, java compiler
will create a (filename.class) file which is actually a byte code. In this
example a.class will be created
• Finally interpret your java class file using java interpreter
E:java program>java a
• And your java program will get executed.
Ad

Recommended

Core java concepts
Core java concepts
Ram132
 
SQL Functions
SQL Functions
ammarbrohi
 
Lecture - 2 Environment setup & JDK, JRE, JVM
Lecture - 2 Environment setup & JDK, JRE, JVM
manish kumar
 
Introduction To C#
Introduction To C#
SAMIR BHOGAYTA
 
Spring boot introduction
Spring boot introduction
Rasheed Waraich
 
I/O Streams
I/O Streams
Ravi Chythanya
 
Constructor ppt
Constructor ppt
Vinod Kumar
 
Java tutorial PPT
Java tutorial PPT
Intelligo Technologies
 
Core Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika Tutorials
Mahika Tutorials
 
JAVA OOP
JAVA OOP
Sunil OS
 
JAVA AWT
JAVA AWT
shanmuga rajan
 
C# basics
C# basics
Dinesh kumar
 
Strings in java
Strings in java
Kuppusamy P
 
Java I/o streams
Java I/o streams
Hamid Ghorbani
 
Java Basics
Java Basics
Sunil OS
 
PL/SQL Fundamentals I
PL/SQL Fundamentals I
Nick Buytaert
 
Testing with JUnit 5 and Spring
Testing with JUnit 5 and Spring
VMware Tanzu
 
Arrays in Java
Arrays in Java
Naz Abdalla
 
Dart programming language
Dart programming language
Aniruddha Chakrabarti
 
C# in depth
C# in depth
Arnon Axelrod
 
Builder pattern
Builder pattern
Shakil Ahmed
 
Java 8 Lambda Expressions
Java 8 Lambda Expressions
Scott Leberknight
 
Introduction to java
Introduction to java
Saba Ameer
 
Constructor in java
Constructor in java
Pavith Gunasekara
 
Clean code
Clean code
Alvaro García Loaisa
 
exception handling in java.ppt
exception handling in java.ppt
Varshini62
 
Abstract class
Abstract class
Tony Nguyen
 
C++ decision making
C++ decision making
Zohaib Ahmed
 
4 implementing java program cinouke abd execye..pdf
4 implementing java program cinouke abd execye..pdf
SATYA136395
 
java:characteristics, classpath, compliation
java:characteristics, classpath, compliation
Shivam Singhal
 

More Related Content

What's hot (20)

Core Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika Tutorials
Mahika Tutorials
 
JAVA OOP
JAVA OOP
Sunil OS
 
JAVA AWT
JAVA AWT
shanmuga rajan
 
C# basics
C# basics
Dinesh kumar
 
Strings in java
Strings in java
Kuppusamy P
 
Java I/o streams
Java I/o streams
Hamid Ghorbani
 
Java Basics
Java Basics
Sunil OS
 
PL/SQL Fundamentals I
PL/SQL Fundamentals I
Nick Buytaert
 
Testing with JUnit 5 and Spring
Testing with JUnit 5 and Spring
VMware Tanzu
 
Arrays in Java
Arrays in Java
Naz Abdalla
 
Dart programming language
Dart programming language
Aniruddha Chakrabarti
 
C# in depth
C# in depth
Arnon Axelrod
 
Builder pattern
Builder pattern
Shakil Ahmed
 
Java 8 Lambda Expressions
Java 8 Lambda Expressions
Scott Leberknight
 
Introduction to java
Introduction to java
Saba Ameer
 
Constructor in java
Constructor in java
Pavith Gunasekara
 
Clean code
Clean code
Alvaro García Loaisa
 
exception handling in java.ppt
exception handling in java.ppt
Varshini62
 
Abstract class
Abstract class
Tony Nguyen
 
C++ decision making
C++ decision making
Zohaib Ahmed
 

Similar to Installation of java and program execution (20)

4 implementing java program cinouke abd execye..pdf
4 implementing java program cinouke abd execye..pdf
SATYA136395
 
java:characteristics, classpath, compliation
java:characteristics, classpath, compliation
Shivam Singhal
 
Java part 1
Java part 1
ACCESS Health Digital
 
Introduction to java
Introduction to java
Rakesh Singh
 
Installing JDK and Eclipse -JDKeclipse.ppsx
Installing JDK and Eclipse -JDKeclipse.ppsx
AbdulKhaleqHerawi1
 
Installing JDK and first java program
Installing JDK and first java program
sunmitraeducation
 
LLLecture-JAVAPROGRAMMINGBasics1.KI.pptx
LLLecture-JAVAPROGRAMMINGBasics1.KI.pptx
talhazc013
 
JAVA CORE
JAVA CORE
Ankit Chauhan
 
Ah java-ppt1
Ah java-ppt1
Haja Abdul Khader A
 
Core java introduction
Core java introduction
Som Prakash Rai
 
lab1.ppt
lab1.ppt
NaveenKumar934092
 
How java works
How java works
thiruvenkatz
 
How java works
How java works
RaxTonProduction
 
lab1 notes to test and write examples related
lab1 notes to test and write examples related
Avinashk515020
 
0_A1590026209_21789_20_2018_0 Lecture.ppt
0_A1590026209_21789_20_2018_0 Lecture.ppt
RithwikRanjan
 
J introtojava1-pdf
J introtojava1-pdf
Emmanuel Alimpolos
 
Introduction to java
Introduction to java
jayc8586
 
Java Intro: Unit1. Hello World
Java Intro: Unit1. Hello World
Yakov Fain
 
Java SpringMVC SpringBOOT (Divergent).ppt
Java SpringMVC SpringBOOT (Divergent).ppt
Aayush Chimaniya
 
A1590026209_21789_20_2018_0 Lecture .ppt
A1590026209_21789_20_2018_0 Lecture .ppt
pranatidubey2004
 
4 implementing java program cinouke abd execye..pdf
4 implementing java program cinouke abd execye..pdf
SATYA136395
 
java:characteristics, classpath, compliation
java:characteristics, classpath, compliation
Shivam Singhal
 
Introduction to java
Introduction to java
Rakesh Singh
 
Installing JDK and Eclipse -JDKeclipse.ppsx
Installing JDK and Eclipse -JDKeclipse.ppsx
AbdulKhaleqHerawi1
 
Installing JDK and first java program
Installing JDK and first java program
sunmitraeducation
 
LLLecture-JAVAPROGRAMMINGBasics1.KI.pptx
LLLecture-JAVAPROGRAMMINGBasics1.KI.pptx
talhazc013
 
lab1 notes to test and write examples related
lab1 notes to test and write examples related
Avinashk515020
 
0_A1590026209_21789_20_2018_0 Lecture.ppt
0_A1590026209_21789_20_2018_0 Lecture.ppt
RithwikRanjan
 
Introduction to java
Introduction to java
jayc8586
 
Java Intro: Unit1. Hello World
Java Intro: Unit1. Hello World
Yakov Fain
 
Java SpringMVC SpringBOOT (Divergent).ppt
Java SpringMVC SpringBOOT (Divergent).ppt
Aayush Chimaniya
 
A1590026209_21789_20_2018_0 Lecture .ppt
A1590026209_21789_20_2018_0 Lecture .ppt
pranatidubey2004
 
Ad

Recently uploaded (20)

Capitol Doctoral Presentation -June 2025.pptx
Capitol Doctoral Presentation -June 2025.pptx
CapitolTechU
 
How to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 Slides
Celine George
 
How to Implement Least Package Removal Strategy in Odoo 18 Inventory
How to Implement Least Package Removal Strategy in Odoo 18 Inventory
Celine George
 
GEOGRAPHY-Study Material [ Class 10th] .pdf
GEOGRAPHY-Study Material [ Class 10th] .pdf
SHERAZ AHMAD LONE
 
Overview of Off Boarding in Odoo 18 Employees
Overview of Off Boarding in Odoo 18 Employees
Celine George
 
ROLE PLAY: FIRST AID -CPR & RECOVERY POSITION.pptx
ROLE PLAY: FIRST AID -CPR & RECOVERY POSITION.pptx
Belicia R.S
 
What is FIle and explanation of text files.pptx
What is FIle and explanation of text files.pptx
Ramakrishna Reddy Bijjam
 
Measuring, learning and applying multiplication facts.
Measuring, learning and applying multiplication facts.
cgilmore6
 
Battle of Bookworms 2025 - U25 Literature Quiz by Pragya
Battle of Bookworms 2025 - U25 Literature Quiz by Pragya
Pragya - UEM Kolkata Quiz Club
 
Nice Dream.pdf /
Nice Dream.pdf /
ErinUsher3
 
JHS SHS Back to School 2024-2025 .pptx
JHS SHS Back to School 2024-2025 .pptx
melvinapay78
 
The Man In The Back – Exceptional Delaware.pdf
The Man In The Back – Exceptional Delaware.pdf
dennisongomezk
 
Paper 108 | Thoreau’s Influence on Gandhi: The Evolution of Civil Disobedience
Paper 108 | Thoreau’s Influence on Gandhi: The Evolution of Civil Disobedience
Rajdeep Bavaliya
 
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
Sourav Kr Podder
 
Ray Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big Cycle
Dadang Solihin
 
Wax Moon, Richmond, VA. Terrence McPherson
Wax Moon, Richmond, VA. Terrence McPherson
TerrenceMcPherson1
 
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Restu Bias Primandhika
 
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Rajdeep Bavaliya
 
ICT-8-Module-REVISED-K-10-CURRICULUM.pdf
ICT-8-Module-REVISED-K-10-CURRICULUM.pdf
penafloridaarlyn
 
Introduction to problem solving Techniques
Introduction to problem solving Techniques
merlinjohnsy
 
Capitol Doctoral Presentation -June 2025.pptx
Capitol Doctoral Presentation -June 2025.pptx
CapitolTechU
 
How to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 Slides
Celine George
 
How to Implement Least Package Removal Strategy in Odoo 18 Inventory
How to Implement Least Package Removal Strategy in Odoo 18 Inventory
Celine George
 
GEOGRAPHY-Study Material [ Class 10th] .pdf
GEOGRAPHY-Study Material [ Class 10th] .pdf
SHERAZ AHMAD LONE
 
Overview of Off Boarding in Odoo 18 Employees
Overview of Off Boarding in Odoo 18 Employees
Celine George
 
ROLE PLAY: FIRST AID -CPR & RECOVERY POSITION.pptx
ROLE PLAY: FIRST AID -CPR & RECOVERY POSITION.pptx
Belicia R.S
 
What is FIle and explanation of text files.pptx
What is FIle and explanation of text files.pptx
Ramakrishna Reddy Bijjam
 
Measuring, learning and applying multiplication facts.
Measuring, learning and applying multiplication facts.
cgilmore6
 
Battle of Bookworms 2025 - U25 Literature Quiz by Pragya
Battle of Bookworms 2025 - U25 Literature Quiz by Pragya
Pragya - UEM Kolkata Quiz Club
 
Nice Dream.pdf /
Nice Dream.pdf /
ErinUsher3
 
JHS SHS Back to School 2024-2025 .pptx
JHS SHS Back to School 2024-2025 .pptx
melvinapay78
 
The Man In The Back – Exceptional Delaware.pdf
The Man In The Back – Exceptional Delaware.pdf
dennisongomezk
 
Paper 108 | Thoreau’s Influence on Gandhi: The Evolution of Civil Disobedience
Paper 108 | Thoreau’s Influence on Gandhi: The Evolution of Civil Disobedience
Rajdeep Bavaliya
 
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
Sourav Kr Podder
 
Ray Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big Cycle
Dadang Solihin
 
Wax Moon, Richmond, VA. Terrence McPherson
Wax Moon, Richmond, VA. Terrence McPherson
TerrenceMcPherson1
 
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Restu Bias Primandhika
 
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Rajdeep Bavaliya
 
ICT-8-Module-REVISED-K-10-CURRICULUM.pdf
ICT-8-Module-REVISED-K-10-CURRICULUM.pdf
penafloridaarlyn
 
Introduction to problem solving Techniques
Introduction to problem solving Techniques
merlinjohnsy
 
Ad

Installation of java and program execution

  • 2. OUTLINE • Downloading and Installation of JDK • Setting path, compilation of program and execution of the complied program
  • 3. 2 APPROACHES • Hard work • Smart work
  • 4. HARD WORK VS SMART WORK • Hard work - means that you have to do all the java path establishment, creation of program, compilation and execution of java program by you own. • Smart Work – means the use of an IDE(Interacted Development Environment) through which we can create java programs using drag and drop facility. • In this session, you will learn the installation, complilation and execution of java program manually (hard work)
  • 5. STEP -1 JDK INSTALLATION PROCESS • For the JDK(Java Development Kit) installation first of all we have to go on the oracle.com website and find the latest version of JDK. • There is a link from where you can download the JDK latest version https://www.oracle.com/java/technologies/javase-jdk15-downloads.html Download the latest version and copy it in a folder named as java on your drive like C drive/D drive or any other local drive now unzip the downloaded file for example in this case e:java and find the path of javac which is a java compiler. Generally it is available in bin folder of our jdk folder. When you unzip the downloaded file you will find the JDK-15 folder in which there will be a bin folder. Select the bin folder and copy the path which we will require at the time of setting of path of our program to java library. This will be E:javajdk-15bin
  • 6. STEP – 2 CREATION OF PROGRAM • Create a folder in the drive of your choice on your computer • Open any basic editor like NOTEPAD, NOTEPAD++, WORDPAR or any other of your choice • Write a program as given in the following slide and save it in your java program folder as e:java program
  • 7. public class a { public static void main(String args[]) { System.out.println("hello"); } }Note : - Things to remember • Java is a case sensitive language so please check the capital and small letters used in this program • When you save this program save it with the name as “class-name.java” for example in the above code our class name is a so we have to save this program with the name of “a.java”.
  • 8. STEP 3 - SETTING THE PATH • To compile our program we have to set a path to our java complier and interpreter. • Now you have to go in run and type cmd • It will open a command prompt window as in the following slides
  • 11. STEP 3 - SETTING THE PATH – CONTD…. • Now get the location of javac.exe • As you see there is a working directory is c:usershp but we have to change to the java program folder. • Now shift the drive as • c:userhp>e: • E:>cd “java progam” • E:java program> • Now type the path command as • E:java program> set path=E:javajdk-15bin This path is the same path which weget in step 1
  • 12. STEP 4 COMPLIALTION OF JAVA PROGRAM • As soon as the path has been created now we have to execute our java program using java complier(javac.exe) so type the following command E:java program>javac a.java • Complier will display all the list of error so now you have to remove all the error present in program. After the debugging, java compiler will create a (filename.class) file which is actually a byte code. In this example a.class will be created • Finally interpret your java class file using java interpreter E:java program>java a • And your java program will get executed.