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.
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.
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
Post a Comment