Compiling and running your Java codes.
1. Create a folder in the desktop.
a. On desktop, right-click the mouse and select new then folder.
b. Name your folder “10 - Section". Ex. 10-Pascal
2. Open the notepad app.
3. Write your Java code and save it to your created folder.
a. Your classname must be your first name followed by the program you are
writing. Ex. “Arvin3x” for multiplication x3 program.
b. Save the program with the file name exactly like your classname. Ex.
“[Link]”
4. Open command prompt app.
5. Locate the folder you have created.
a. Enter the code “cd C:\users\admin\desktop\10-section” Ex. 10-algorithm
b. Verify that you have opened the folder by checking the location at the left part
of the command prompt, the folder name must be displayed before the
blinking cursor.
6. Compile your Java program.
a. Enter the code “javac [Link]” Ex. javac [Link] and press Enter.
b. If there are code errors, it will be displayed. If there are no errors, you should
be able to view the location of the folder and the cursor.
7. Run your Java program.
a. If there are no errors, run your program by entering this code: “java Filename”
Ex. java Arvin3x and press Enter.
b. Your program must run.