Make sure you configure your software environment before using the Java example applications.
Add C:\Program Files\Java\jdk_version\bin to the PATH environment variable where jdk_version is the version, for example, jdk5.0.
To edit the windows PATH environment variable:
Click the Start button.
Right-click My Computer and select properties to launch System Properties.
Click the Advanced tab.
Click Environment Variables.
Under System Variables, scroll down and click Path.
Click Edit to launch Edit System Variable.
Add the Java path name to the PATH environment variable. Make certain each path name is separated by a semicolon (;).
Click OK to close each window.
Also see Software Requirements.