Grace Hopper: the quintessential geek. Not content with inventing the Mark I Calculator, she wrote the first compiler. Her invention led to the creation of COBOL. Hopper's contribution to the world of computers cannot be underestimated: she pioneered the idea of using programming languages that bear some relation to the English language, and then using a compiler to convert these into a form that a computer can rapidly digest. While this idea seems obvious to any modern programmer, in Hopper's day it was a completely original philosophy. She also famously discovered a moth causing a computer to malfunction -- the first recorded case of a real computer bug.

Steps in Creating, Compiling and Executing a Java Program

1. Write the source code in Notepad or a "java envirionment", save as name.java

To use the command prompt window (black window)

2. Open the command prompt window from Accesories or from the run command on the start menu by writing "cmd"

3. The window opens in a file/folder location. To change the location:

    A. C:     to change to the C: (local computer) drive

    B.  cd..     to drop back on directory (ie, c:/javafiles/html   after the cd.. will be c:/javafiles)

    C.  cd javafiles   to move for the javafiles directory

  

4. Additional commands:  to list all the items within the folder write the command   dir

    to list selected items in a folder write a command such as    dir *.java (for all .java source listings)

5. To compile the java program (source code) once you are in its folder the command is:

     javac  ProgramName.java

   This creates a byte code version of the program called;   ProgramName.class

6. To execute the compiled program (class file) within the folers the command is:

    java ProgramName

Summary of command used:

cd parameter (change directory)
examples: cd .. (up or back one directory)
cd javafiles change to javafiles

dir (list directory)
examples: dir (lists entire directory
dir *.java (lists all xxx.java files in directory)

javac PgmName.java     (creates the byte code PgmName.class file)

Java PgmName             (runs the PgmName.class file)