1 JDK Installation Guide
1 JDK Installation Guide
9 (64-bit)
https://www.filehorse.com/download-java-development-kit-64/55791/
Download Java JDK 11.0.9 (64-bit)
JDK Installation
Click Next, and Next to install JDK.
After successfully installed, click the close button.
How To Add Java JDK Bin Folder To Windows Path
Right click on the computer icon in Explorer and click on Properties in the pop up menu, as
shown below.
This will display your system properties. Click on the Advanced system settings link on the left
hand side menu.
copyright@ http://tryqa.com/how-to-write-run-first-java-program-cmd-notepad/
This will open the System Properties dialog. Click on the Environment Variables button near
the bottom.
copyright@ http://tryqa.com/how-to-write-run-first-java-program-cmd-notepad/
This will open the Environment Variables dialog. The system variables are listed in the lower
group in the dialog box. If the Path variable is not visible, use the scroll bar to scroll down the
list of System variables, to bring the Path variable into view, as shown in the screenshot below.
Click on the row containing the Path variable, to select it and then click
the Edit button under System variables. If for some reason, your system does not
have a Path variable, click on the New button under System variables.
copyright@ http://tryqa.com/how-to-write-run-first-java-program-cmd-notepad/
Add the above path to the end of the variable value of Path. First we will add the
separator semicolon “;” followed by the path of the JDK binary folder as shown
below.
Then, click the Ok button on the Edit System Variable dialog, the Environment
Variables dialog and System Properties dialog.
copyright@ https://www.javatpoint.com/how-to-run-java-program-in-cmd-using-notepad
Save the Java program by using the class name followed by .java extension.
copyright@ https://www.javatpoint.com/how-to-run-java-program-in-cmd-using-notepad
To compile and run a Java program, open the Command Prompt by pressing Windows Key +
R, type cmd and press enter key or click on the Ok button.
In the Command Prompt window, go inside the saved folder where we have saved the Java
program.
Type: cd Desktop\Demo
copyright@ https://www.javatpoint.com/how-to-run-java-program-in-cmd-using-notepad
Now we are inside the Demo folder where we have saved the Java program.
When we compile a Java program without any error, it creates a .class file with the same name as
the file name at the same location (where the program is saved).
copyright@ https://www.javatpoint.com/how-to-run-java-program-in-cmd-using-notepad