Java Reference
In-Depth Information
Figure 1.3
Using the SET command to set the PATH environment.
For other versions of Windows, the PATH environment variable is edited in
the c:\autoexec.bat file. You then need to restart your system. In all versions of
Windows, you can also set the PATH manually at the command prompt (also
called the DOS prompt) by using the SET command, as shown in Figure 1.3.
If you use the SET command as shown in Figure 1.3, the PATH will only be
set for that particular DOS window, and the changes will be lost when you
close that DOS window.
Running the javac Compiler
The javac tool is the Java compiler you will use to compile the Java code you
write into bytecode. To run javac, type javac at the command prompt and press
Enter. Figure 1.4 shows the output that you should see. If an error message
occurs along the lines of a file not being found, your PATH might not have
been set correctly.
Figure 1.4
The javac tool compiles Java source code into bytecode.
Search WWH ::




Custom Search