checks before posting:
1. Ensure that you are using JVM 1.5.0_xx or greater.
2. Please ensure that you have correctly assigned class path and a java home environment variable.
3. Any code written, compiled and executed should be done so within an IDE (Eclipse is recommended).
Following these rules will make it easier for the person trying to resolve your programming problem.
Many Thanks