Installing Java, compiling Java, and running Java
This user comes from
Find other posts in the same category:

Long description

You must first download a Java JDK on your system (check first, there may already be one.. look for an executable called javac or javac.exe). Look for the highest version number that does not end in RC (for release candidate). Make sure to download the JDK (Java Development Kit), not the JRE (Java Runtime Environment). The develepment kit includes the java compiler.

You will need to set the path so that you can run java from anywhere
See pages 17 and 18 in Java for Kids

COMPILING (translating Java's English into something the computer can understand)

Do "javac" to (translate) compile your program (use your actual file's name)
If it compiles correctly, you will have a file with the name
Make sure you remember the .java

Do "java filename" to run the program.
make sure you are doing
"java filename"
not "java filename.class"
or you will get a class not defined error
If you get a class not defined error, see this page for another possible cause.

To see articles on the same topic, click the links below the name of the author at the top of this page.