SlideShare a Scribd company logo
1 of 12
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
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.

More Related Content

What's hot

What's hot (20)

javascript objects
javascript objectsjavascript objects
javascript objects
 
Basic Java Programming
Basic Java ProgrammingBasic Java Programming
Basic Java Programming
 
Core java
Core java Core java
Core java
 
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 Language fundamental
Java Language fundamentalJava Language fundamental
Java Language fundamental
 
Core java concepts
Core java  conceptsCore java  concepts
Core java concepts
 
Java architecture
Java architectureJava architecture
Java architecture
 
Operators in java
Operators in javaOperators in java
Operators in java
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Language
 
Method overloading
Method overloadingMethod overloading
Method overloading
 
Java program structure
Java program structureJava program structure
Java program structure
 
Presentation on-exception-handling
Presentation on-exception-handlingPresentation on-exception-handling
Presentation on-exception-handling
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Java basic
Java basicJava basic
Java basic
 
Java
JavaJava
Java
 
Core java
Core javaCore java
Core java
 
Core Java
Core JavaCore Java
Core Java
 
Core java complete ppt(note)
Core java  complete  ppt(note)Core java  complete  ppt(note)
Core java complete ppt(note)
 
Core Java
Core JavaCore Java
Core Java
 
Features of JAVA Programming Language.
Features of JAVA Programming Language.Features of JAVA Programming Language.
Features of JAVA Programming Language.
 

Similar to Installation of java and program execution

Similar to Installation of java and program execution (20)

Java part 1
Java part 1Java part 1
Java part 1
 
Installing spark scala console in windows 10
Installing spark scala console in windows 10Installing spark scala console in windows 10
Installing spark scala console in windows 10
 
How to write a simple java program in 10 steps
How to write a simple java program in 10 stepsHow to write a simple java program in 10 steps
How to write a simple java program in 10 steps
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
Javalecture 1
Javalecture 1Javalecture 1
Javalecture 1
 
Android app upload
Android app uploadAndroid app upload
Android app upload
 
Core java introduction
Core java introduction Core java introduction
Core java introduction
 
Java introduction
Java introductionJava introduction
Java introduction
 
Pj01 2-install java and write first java program
Pj01 2-install java and write first java programPj01 2-install java and write first java program
Pj01 2-install java and write first java program
 
NDK Programming in Android
NDK Programming in AndroidNDK Programming in Android
NDK Programming in Android
 
1.introduction to java
1.introduction to java1.introduction to java
1.introduction to java
 
java:characteristics, classpath, compliation
java:characteristics, classpath, compliationjava:characteristics, classpath, compliation
java:characteristics, classpath, compliation
 
Java introduction
Java introductionJava introduction
Java introduction
 
Java Intro: Unit1. Hello World
Java Intro: Unit1. Hello WorldJava Intro: Unit1. Hello World
Java Intro: Unit1. Hello World
 
JAVA Program Examples
JAVA Program ExamplesJAVA Program Examples
JAVA Program Examples
 
Java lab1 manual
Java lab1 manualJava lab1 manual
Java lab1 manual
 
Android ndk
Android ndkAndroid ndk
Android ndk
 
Android NDK
Android NDKAndroid NDK
Android NDK
 
itft-Overview of java language
itft-Overview of java languageitft-Overview of java language
itft-Overview of java language
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 

Recently uploaded

Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 

Recently uploaded (20)

Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 

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
  • 9.
  • 10.
  • 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.