You may well have had a CLASSPATH problem, but I wouldn't suspect that adding tools.jar to be the likely solution. tools.jar doesn't contain the J2SE API. It contains some tools, for doing things like compiling at runtime.
rt.jar contains the J2SE API, but it shouldn't need to be added to the CLASSPATH, as the JRE should be able to locate it automatically.
For your CLASSPATH setting, if you don't need anything not in the J2SE API, then I'd suggest either not specifying a CLASSPATH value, or simply specifying that the current working directory, represented by a period, is in your CLASSPATH.