HOW TO RUN A JAVA PROGRA USING CMD Prompt

In this we will see how to run a java pogram in cmd prompt

Compiling and running a java program is very easy after JDK installation. Following are the steps −

1) We have to download JDK. JDK is Java Development Kit  you can download it from its official website. 

click here to download JDK 

2) After downloading JDK install the Kit and then start program

3) To run a java program in cmd. open cmd as Run as administration shown in fig 

  to run java program type in notepad or notepad++ or any editor.


4) After Opening cmd type "cd C:\Program Files\Java\JAVA\jdk1.6.0_18\bin" as shown in fig. after typing "cd" give space and then file path instead of typing direcly copy the path of jdk from your "C drive"  and hit enter.


5) After step 4 type"javac program name.java" javac is use to compile the program if there is error in program it will show otherwise it will show new line as shown in fig.


In this First.java is program name. 

6) After step no 5 type "java First" and hit enter you will see the program output as shown in fig.


7) This is first program of a java to print hello world


Here I am Using Sublime Text Editor to download Sublime text editor  Click here


If you face any problem contact me at the email address given below

How much helpfull is the blog please comment 


Facebook  @Exam Baba

Instagram #Engg_helper

Comments

Popular posts from this blog

HOW TO DOWNLOAD AND INSTALL PLUGINS IN SUBLIME TEXT EDITOR 3 or ANY VERSION

HOW TO DOWNLOAD AND INSTALL PLUGINS IN SUBLIME TEXT EDITOR 3 or ANY VERSION PART 4

HOW TO REMOVE DOWNLOADED AND INSTALLED PLUGINS IN SUBLIME TEXT EDITOR OF ANY VERSION

HOW TO DOWNLOAD AND INSTALL PLUGINS IN SUBLIME TEXT EDITOR 3 or ANY VERSION PART 3

Followers