go to previous page   go to home page   go to next page


Click in the command window and enter the DIR command.

Step 7: Compile the Program

Compile the program with javac

The DIR command lists the files in a DIRectory (also called "folder"). Enter the command (upper or lower case) to see that all the above steps did what you hope. You could also enter the command TYPE HelloPlanets.java to type the text of the file on the screen.

After confirming that the file is there, compile it with the command

javac HelloPlanets.java

Enter a second DIR command to see that the compiler created a bytecode file, HelloPlanets.class

If there are error messages, go back to Notepad and try to correct the errors. Then use "Save" from the "File" menu to save the corrected file. Enter DIR again and check the time to verify that you are saving the file where you expect.

If you copied and pasted the example program, nothing should be wrong. Check that you did not clip off the start or end of the program. Check that you saved the file as "ANSI".


Are we there yet?

go to previous page   go to home page   go to next page