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
En esta página del sitio puede ver el video en línea HOW TO COMPILE & EXECUTE JAVA PROGRAM BY USING CMD WITH NOTEPAD......😃😃 de Duración hora minuto segunda en buena calidad , que subió el usuario Mr.ManLoop 01 enero 1970, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 222 veces y le gustó 26 a los espectadores. Disfruta viendo!