Test the installation by executing the standard Hello World script. Copy the following into a text editor and save it as HelloWorld.java.
class HelloWorld {
public static void main(String args[])
{
System.out.println("Hello, World");
}
}
Go to a command prompt, move into the directory you saved the file in, and type javac HelloWorld.java. This compiles the program. Then type java HelloWorld. If you see Hello, World at the console, you have the the SDK working correctly. If you can't reach this far, you may not have set your PATH environment variable, or you may have installed Java incorrectly. Consult your platform's documentation to correct the problem.