Step 1:
a.
Go to Start Menu -> Click ‘Run’ or
b. Press
Window Logo on your keyboard + R
*If you
can’t find the ‘Run’ on your Start Menu,
right click the ‘Start Menu logo’ à Properties à choose ‘Customize’ button à put a tick on ‘Run command’ and hit OK and ‘Apply’.
Step 2:
Type ‘cmd’ on
the Run window.
Step 3:
The command
window will appear after.
a.
Type: cd C:\java\bin to go
to the directory C:\java\bin> where
your
java files (.java) are saved.
b.
Compiling your java file. This will create a
.CLASS file when compiling is done .
Type this:
javac
myJavaFile.java
*If no
errors were found, proceed to running your java file.
*In
compiling your java program, always remember that it translates the code line
by line.
c.
Running your java file.
Type,
java myJavaFile.java
*Java is case-sensitive;
*Don’t forget to include the file extension
(.JAVA) of your java file when compiling and running them.
Your thoughts about this post? Leave a commment now.