Monday June 5, 2000


Today we will type a very simple program to illustrate the process that we go through in creating a program.
  1. Click the Start Button, move to Programs, and select MS-DOS prompt.

  2. You will be presented with a DOS window.

  3. Issue the command cd \.

  4. You should see the prompt c:\>.

  5. Type the command mkdir java.

  6. Issue the command cd java.

  7. Issue the command notepad Example1.java.

  8. Type the following being careful of capitalization.
    public class Example1 {
       public static void main(String[] args) {
          System.out.println("Hello World");
       }
    }
    
  9. Click the File Menu. Select Save.

  10. Minimize the DOS Window.

  11. Now go to the Start Button again, and open another MS-DOS prompt.

  12. Issue the command cd c:\java.

  13. Type the command c:\jbuilder2\java\bin\javac Example1.java.

  14. Now type the command dir. If the source file was compiled correctly, then you should see a file called Example1.class.

  15. Now type the command c:\jbuilder2\java\bin\java Example1.

  16. You should see the output Hello World.