Thanks very much for all your responses. I am not using packages, but I am wondering if there is some porblem in the way JDK got installed and hence the problem. I ran several other examples and the same problems. I am not having an error when I compile files which inherit some custom classes from packages like AWT, SWING, etc.
Best Regards
Uday