HOW TO WRITE AND RUN FIRST PROGRAM IN JAVA USING NOTEPAD?

WRITEING AND RUNNING FIRST PROGRAM IN JAVA USING NOTEPAD

First of all download JDK and install it for run java program. You can download JDK from here http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
After install JDK open Notepad and write your first program as given in following image.
public class Hello
{
public static void main(String arg[])
{
System.out.println(“Hello World”);
}
}
WRITEING AND RUNNING FIRST PROGRAM IN JAVA USING NOTEPAD
Now click on file menu and click on save as.
WRITEING AND RUNNING FIRST PROGRAM IN JAVA USING NOTEPAD
Remember program save with same name as of your class name given in program and give extension .java. When you will save your program byte code will generate.
Hello.java
Now open command Prompt  and write command :- cd\
WRITEING AND RUNNING FIRST PROGRAM IN JAVA USING NOTEPAD
click on Enter . Now  copy address of folder where you save your program.
WRITEING AND RUNNING FIRST PROGRAM IN JAVA USING NOTEPAD
and paste it in command prompt as given following.
cd\Users\Gurjant Bhullar\Documents
WRITEING AND RUNNING FIRST PROGRAM IN JAVA USING NOTEPAD
and then press enter key.
Now set path of JDK to compile and run program. To set path of JDK open C:\ drive in your system.
Then open program file folder in c drive. Open java folder under program folder. select  jdk folder. In jdk folder open bin folder  as given in following image and copy path.
WRITEING AND RUNNING FIRST PROGRAM IN JAVA USING NOTEPAD
Now paste path in command prompt as given in following image:-
set path = C:\Program Files\Java\jdk1.8.0_51\bin
WRITEING AND RUNNING FIRST PROGRAM IN JAVA USING NOTEPAD
Now write following command to compile your program:-
javac  Hello.java
when you will compile your byte code a class file is generated which we can run later. You can see that class in same folder where you was same your byte code
WRITEING AND RUNNING FIRST PROGRAM IN JAVA USING NOTEPAD
After complete compilation now you can run your program using following command:-
java Hello
WRITEING AND RUNNING FIRST PROGRAM IN JAVA USING NOTEPAD
when you click on enter key you will get following output
WRITEING AND RUNNING FIRST PROGRAM IN JAVA USING NOTEPAD
Finished.