Compiling and Running a .java file on Windows 7
The first thing you will need to do is to open CMD through the start menu. You can do this by following the images below.
Once you have this open, you can use the cd command to change to the directory where you have your java file stored. You can then use the dir command to make sure it is there. You can see an example of this using the image below.
The final thing is to compile and run our program. The command for this is as follows
to run the program, we type in
You can see a full example in the image below