Quick Index
What Is A Basic Verification


This is the most basic verification. Note that we may want to do this to determine if we need to install Java, and also do this verification after completing a Java install and setup.

We're going to take a simple JAVA file/program and do the following:


Unzip


  • Open this ZIP file...
  • Copy "HelloWorld.java" from the ZIP file to the directory "C:\Work\Scratch" (create directory if needed)

Our "Scratch" directory should now contain "HelloWorld.java"
C:\
  \---Work
      \---Scratch
          HelloWorld.java

Compile


  • Open console (if console is open from previous -- close and reopen to get new environment settings)
  • Make sure current directory is "C:\Work\Scratch"
  • Type in command "javac HelloWorld.java"
  • You should not get any errors (as shown here)

If this check fails (possibly an error like "'javac' is not recognized ...") then go back to the previous page and continue with the install.
C:\Work\Scratch>javac HelloWorld.java

C:\Work\Scratch>

Run



Verification
  • Type in command highlighted
  • The output should be Hello World!

If this fails, see next step
C:\Work\Scratch>
1
java HelloWorld Hello World!
Second Try
  • Type in command highlighted
  • The output should be Hello World!

If this fails, check the Troubleshoot page and try the Java installation and configuration again
C:\Work\Scratch>
1
java -classpath "." HelloWorld
2
Hello World!