HOW TO COMPILE & EXECUTE JAVA PROGRAM BY USING CMD WITH NOTEPAD......😃😃

Veröffentlicht am: 01 Januar 1970
auf dem Kanal: Mr.ManLoop
222
26

The tutorial is about, how to compile and execute java program. To write java program notepad is used as editor. To compile javac command is used on command line. To execute java program, on command prompt, java command is used.


TOPICS COVERED IN THIS TUTORIAL :

1. COMPILE AND RUN JAVA PROGRAM

2. HOW TO SET JAVA CLASS PATH TEMPORARY AND PERMANENT

========================================================================================

1. COMPILE AND RUN JAVA PROGRAM

Following are the steps to compile and run java program :

Step 1 : Open CMD

Step 2 : Check whether java compiler is accessed by CMD or not, for this type "javac" and press enter key.

Step 3 : If it says "javac is not recoginsed as an internal or external command", then we have to set path, for temporary path set type "set path= C:\Program Files\Java\jdk1.8.0_45\bin" and press enter, its my javac path, you have to provide your java classpath. But if it directly displays some definiations, then proceed to next step.

Step 4 : Then open drive where the program is saved, like "d:" and press enter

Step 5 : Then if program is saved in any folder, type "cd folder_name", otherwise skip this step.

Step 6 : Now compile the program, "javac Abc.java" (Abc.java is java file name)

Step 7 : If there is any error it will display, if not then it will create a .class file

Step 8 : Now run java program, type "java Abc" (Abc is .class file name), it will display the output

----------------------------------------------------------------------------------------------------------------------------------------------------

2. HOW TO SET JAVA CLASS PATH TEMPORARY AND PERMANENT

=== For Temporary Path Set : ===

Step 1 : Open CMD

Step 2 : Type "set path= C:\Program Files\Java\jdk1.8.0_45\bin" and press enter, its my javac path, you have to provide your java classpath.

Step 3 : Then you can check whether classpath is successfully set or not, for this type "javac" and enter, if it displays some definations then path is set successfully, but if it says "javac is not recoginsed as an internal or external command" then path was not set, retry again.

=== For Permanent Path Set : ===

Step 1 : Open "My Computer" Properties.

Step 2 : Click "Advanced System Settings" (present on left side of screen), it will open a dialog box.

Step 3 : Click "Environment Variables", it will again open a new dialog box.

Step 4 : Then here we can set path, simply provide variable name as "path" and Value "C:\Program Files\Java\jdk1.8.0_45\bin".

Step 5 : Open CMD and type "javac" and enter, it will display some definations, Successfully set path permanently.

===================================================

DO support Guys....

Our Channel :    / @mr.manloop7975  

Fb Page :   / mrmanloop-102320425264042  

Insta Page :   / mr_manloop  

======================================================

#java
#javabeginners
#cmd
#notepad
#javabeginnersintamil
#mr_manloop
#openjdk


Auf dieser Seite können Sie das Online-Video HOW TO COMPILE & EXECUTE JAVA PROGRAM BY USING CMD WITH NOTEPAD......😃😃 mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Mr.ManLoop 01 Januar 1970 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 222 Mal angesehen und es wurde von 26 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!