How to create and run Java program using CMD

Published: 02 June 2017
on channel: Naimul Ferdous
3,919
17

Step 1: Open any text editor.

Step 2: Write code.

Step 3: Save the program as ClassName.java and note the directory of ClassName.java file.

Step 4: Open CMD: Press WinKey+R, then write cmd and press EnterKey.

Step 5: Write Command: set path=%path%;path of Java jdk bin, then Press EnterKey.

Step 6: Write Command: cd directory of ClassName.java file Press EnterKey.

Step 7: Write Command: javac ClassName.java Press EnterKey.

Step 8: Write Command: java ClassName Press EnterKey.

Step 9: Done !


On this page of the site you can watch the video online How to create and run Java program using CMD with a duration of hours minute second in good quality, which was uploaded by the user Naimul Ferdous 02 June 2017, share the link with friends and acquaintances, this video has already been watched 3,919 times on youtube and it was liked by 17 viewers. Enjoy your viewing!