SlideShare a Scribd company logo
9
Most read
10
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.

More Related Content

PPT
Packages and interfaces
PDF
Introduction to Java Programming
PDF
Introduction to basics of java
PPT
Visual basic
PPTX
Visual Basic Controls ppt
PPTX
Introduction to java
PPTX
MongoDB + Java + Spring Data
PPTX
Introduction to Java
Packages and interfaces
Introduction to Java Programming
Introduction to basics of java
Visual basic
Visual Basic Controls ppt
Introduction to java
MongoDB + Java + Spring Data
Introduction to Java

What's hot (20)

PDF
Java Strings Tutorial | String Manipulation in Java | Java Tutorial For Begin...
PDF
JAVA PROGRAMMING- Exception handling - Multithreading
PDF
Visual Basic IDE Introduction
PPTX
Control statements in java
PPT
visual basic v6 introduction
PDF
Methods in Java
PPTX
Methods in java
PPT
pre processor directives in C
PPSX
Introduction of java
PPTX
Introduction to JAVA
PDF
Genesis and Overview of Java
PDF
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...
PPTX
PPT
Difference between C++ and Java
PPTX
Control structures in java
PPTX
User define data type In Visual Basic
PDF
Java presentation
PPTX
Java constructors
PDF
Java Basic Syntax
PPTX
System Programming Unit III
Java Strings Tutorial | String Manipulation in Java | Java Tutorial For Begin...
JAVA PROGRAMMING- Exception handling - Multithreading
Visual Basic IDE Introduction
Control statements in java
visual basic v6 introduction
Methods in Java
Methods in java
pre processor directives in C
Introduction of java
Introduction to JAVA
Genesis and Overview of Java
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...
Difference between C++ and Java
Control structures in java
User define data type In Visual Basic
Java presentation
Java constructors
Java Basic Syntax
System Programming Unit III
Ad

Similar to Installation of java and program execution (20)

PDF
PDF
Installing spark scala console in windows 10
PDF
How to write a simple java program in 10 steps
PDF
4 implementing java program cinouke abd execye..pdf
PPTX
Introduction to java
PPT
Javalecture 1
PPTX
PDF
Java Programming Fundamentals: Complete Guide for Beginners
PDF
3 jre ,jdk and jvm and structure of java program.pdf
PDF
Core java introduction
PPT
Java introduction
PPTX
Pj01 2-install java and write first java program
PDF
NDK Programming in Android
PPTX
1.introduction to java
PPTX
java:characteristics, classpath, compliation
PPTX
Object-Oriented: Everything is modeled as an object. Platform Independent: C...
PPTX
Java introduction
PDF
Java Intro: Unit1. Hello World
PDF
JAVA Program Examples
PPTX
Object Oriented Programming Part 1 of Unit 1
Installing spark scala console in windows 10
How to write a simple java program in 10 steps
4 implementing java program cinouke abd execye..pdf
Introduction to java
Javalecture 1
Java Programming Fundamentals: Complete Guide for Beginners
3 jre ,jdk and jvm and structure of java program.pdf
Core java introduction
Java introduction
Pj01 2-install java and write first java program
NDK Programming in Android
1.introduction to java
java:characteristics, classpath, compliation
Object-Oriented: Everything is modeled as an object. Platform Independent: C...
Java introduction
Java Intro: Unit1. Hello World
JAVA Program Examples
Object Oriented Programming Part 1 of Unit 1
Ad

Recently uploaded (20)

PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Institutional Correction lecture only . . .
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Lesson notes of climatology university.
PDF
01-Introduction-to-Information-Management.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
GDM (1) (1).pptx small presentation for students
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Abdominal Access Techniques with Prof. Dr. R K Mishra
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Microbial diseases, their pathogenesis and prophylaxis
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Institutional Correction lecture only . . .
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Final Presentation General Medicine 03-08-2024.pptx
Lesson notes of climatology university.
01-Introduction-to-Information-Management.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
STATICS OF THE RIGID BODIES Hibbelers.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
Cell Types and Its function , kingdom of life
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
Final Presentation General Medicine 03-08-2024.pptx
GDM (1) (1).pptx small presentation for students
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape

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.