How to run a java program in CMD

 In this blog I m going to show you How to run a java program in Command prompt or CMD.

The video for this I have uploaded on my YouTube channel. Watch the video carefully for better understanding.


Step 1 :- Type the code in notepad.


Step 2 :- Save the code in C drive with .java extension. And filename must be classname.

So, the filename will be :- hello.java


Step 3 :- Open Command prompt / CMD and come back to the C drive.
Then after that we have to first compile the code.

Step 4 :- For Compilation process :- javac classname.java
Type this command and press enter. 




Step 5 :- If you got 0 errors then we have to run a program. 

For running process :- java classname


Subscribe my channel on YouTube and get more ideas πŸ‘‡

YouTube Link :- https://www.youtube.com/channel/UC8U2tW9d8N_qosD8739Id5Q 


Comments

Popular posts from this blog

How to take Google Classroom on Desktop Home screen.

How to Connect Scott user in Oracle database - SQL Language

How to make Colorful spiral using Python