How do you compile? From an IDE? Or manually with JDK tools from command prompt? If the latter, it may be a "classpath" problem. Do you know what is the classpath and how to set it? If not, see How...