Edit-Compile-Test on Windows in T-411




Make a new subdirectory (folder)



Edit using Notepad


  • Step 1: Fire up Notepad
    (Sometimes Accessories is a folder on the desktop)
    This should bring up Notepad:

  • Step 2: Now type in (or edit) the text for the program:

  • Step 3: Use Save as... and save the file as HelloWorld.java in the desired folder: (You may need to click on "My Computer" on the left to see the drive.)

    Important: the filename is case-sensitive.


Compile at the command-line


  • Step 1: Go to startRun and type in cmd:

  • Step 2: In the command-prompt window, use the cd command to navigate to the desired folder:

  • Step 3: Now list the files in there by typing dir and you should see HelloWorld.java:

  • Step 4: Next, compile the Java program by typing javac HelloWorld.java

    You will note that nothing appears to happen
            => Later, we will learn that this is a good thing (no errors reported)


Execute the program at the command-line


  • Execute the program by typing java HelloWorld at the command-prompt: