Most of the time I have seen beginners struggle with compiling programs that use package names. Generally when you are learning java, you write everything in one program, compile and run the program. This means that you would never start practicing using package names. These days most of the junior developers directly start working on a IDE. When you start with IDE you miss out certain stuff which is fundamental. If you are a developer try writing a simple program using a package name and compile and make it run in the DOS prompt. If you are successful, well and good.
The point here is not about packages but when you get into a compilation error that says that a particular class is not found, and interestingly the class that the compiler is looking for might be under the same directory as your other classes might be or from where you are compiling. Wait a minute, did you check if you had a CLASSPATH variable set? If yes did you also include the current directory in that path? OK you might ask, how to add the current directory? Today it might be c:\java, tomorrow I might run another program in another location. Well if you didn’t know one of the basic information that a OS recognizes . (dot) as a current directory then know it now. Include . (dot) in your CLASSPATH variable, the java compiler looks into the directory where you are trying to compile from as well. The class not found issue occurs when you have a CLASSPATH variable set that does not include the current directory and a class refers to other classes in the same project under different package structure.