-
Step 1
Open the text editor of your choice.
-
Step 2
Write the code and create the source file.
-
Step 3
Save the source file with a .java extension. If the name of your file is Example, then name it Example.java. Save the file as a txt file in the Java folder.
-
Step 4
Open the command window to get to the command prompt.
-
Step 5
Find the file you just created. It will be in the Java folder.
-
Step 6
Compile the code. Type "javac Example.java" without the quotes. Java is case sensitive. So if you capitalized the name of the file, be sure to capitalize it here. Once compiled, you will see a new file has been created in the Java folder named Example.class.














