Testing your Java Path | Heaton Research

Testing your Java Path

Get the entire book!
Java for the Beginning Programmer

Open a command prompt window. This can be done from under the Windows XP Start button and then choosing “All Programs”, then “Accessories”, then “Command Prompt”. From the command prompt enter:

java -version

You should see the version of Java displayed. Now enter:

javac -version

You should see the version again, and a long list of options. Both of these commands should produce a screen similar to Figure 2.18.

Figure 2.18: Verify Java Works

Verify Java Works

If you did everything right, you should see something like above. If you are getting errors, recheck the steps on setting the path.

Now that you have installed Java, you are ready to create your first Java application.

Copyright 2005-2008 by Heaton Research, Inc.