5
Most read
9
Most read
10
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

PDF
Introduction to Java Programming
PDF
Introduction to Java
PPTX
JRE , JDK and platform independent nature of JAVA
PPTX
Data Types, Variables, and Operators
PPT
Java Presentation
PPTX
Introduction to Basic Java Versions and their features
PPTX
Introduction to JAVA
Introduction to Java Programming
Introduction to Java
JRE , JDK and platform independent nature of JAVA
Data Types, Variables, and Operators
Java Presentation
Introduction to Basic Java Versions and their features
Introduction to JAVA

What's hot (20)

PPTX
Java Introduction
PPT
JDBC – Java Database Connectivity
PPTX
Installing JDK and first java program
DOCX
Java and its features
PDF
Introduction to Java Programming Language
PPTX
History Of JAVA
PPT
Java basic
PPT
Java awt
PPT
Core java concepts
PPTX
Presentation on-exception-handling
PPTX
Core java complete ppt(note)
PPTX
OCA Java SE 8 Exam Chapter 1 Java Building Blocks
PPSX
Elements of Java Language
PDF
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
PPSX
Introduction to java
PPT
Generics in java
PPTX
JAVA FEATURES
PPTX
Java architecture
PDF
Core Java Tutorial
PPTX
Type casting in java
Java Introduction
JDBC – Java Database Connectivity
Installing JDK and first java program
Java and its features
Introduction to Java Programming Language
History Of JAVA
Java basic
Java awt
Core java concepts
Presentation on-exception-handling
Core java complete ppt(note)
OCA Java SE 8 Exam Chapter 1 Java Building Blocks
Elements of Java Language
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
Introduction to java
Generics in java
JAVA FEATURES
Java architecture
Core Java Tutorial
Type casting in java
Ad

Similar to Installation of java and program execution (20)

PDF
PDF
Installing spark scala console in windows 10
PPTX
JAVA PROGRAMMING BCA SECOND SEMESTER....
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
Installing spark scala console in windows 10
JAVA PROGRAMMING BCA SECOND SEMESTER....
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
Ad

Recently uploaded (20)

DOCX
Cambridge-Practice-Tests-for-IELTS-12.docx
PDF
HVAC Specification 2024 according to central public works department
PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PDF
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic
PDF
Journal of Dental Science - UDMY (2020).pdf
PDF
English Textual Question & Ans (12th Class).pdf
PDF
Skin Care and Cosmetic Ingredients Dictionary ( PDFDrive ).pdf
PDF
semiconductor packaging in vlsi design fab
PDF
The TKT Course. Modules 1, 2, 3.for self study
PDF
MICROENCAPSULATION_NDDS_BPHARMACY__SEM VII_PCI Syllabus.pdf
PDF
Environmental Education MCQ BD2EE - Share Source.pdf
PPTX
Climate Change and Its Global Impact.pptx
PDF
1.Salivary gland disease.pdf 3.Bleeding and Clotting Disorders.pdf important
PDF
Journal of Dental Science - UDMY (2021).pdf
PPTX
Education and Perspectives of Education.pptx
PDF
Compact First Student's Book Cambridge Official
PPTX
UNIT_2-__LIPIDS[1].pptx.................
PDF
Laparoscopic Colorectal Surgery at WLH Hospital
PDF
Fun with Grammar (Communicative Activities for the Azar Grammar Series)
PDF
Literature_Review_methods_ BRACU_MKT426 course material
Cambridge-Practice-Tests-for-IELTS-12.docx
HVAC Specification 2024 according to central public works department
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic
Journal of Dental Science - UDMY (2020).pdf
English Textual Question & Ans (12th Class).pdf
Skin Care and Cosmetic Ingredients Dictionary ( PDFDrive ).pdf
semiconductor packaging in vlsi design fab
The TKT Course. Modules 1, 2, 3.for self study
MICROENCAPSULATION_NDDS_BPHARMACY__SEM VII_PCI Syllabus.pdf
Environmental Education MCQ BD2EE - Share Source.pdf
Climate Change and Its Global Impact.pptx
1.Salivary gland disease.pdf 3.Bleeding and Clotting Disorders.pdf important
Journal of Dental Science - UDMY (2021).pdf
Education and Perspectives of Education.pptx
Compact First Student's Book Cambridge Official
UNIT_2-__LIPIDS[1].pptx.................
Laparoscopic Colorectal Surgery at WLH Hospital
Fun with Grammar (Communicative Activities for the Azar Grammar Series)
Literature_Review_methods_ BRACU_MKT426 course material

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.