Java source files and class files should sit in a directory hierarchy that mirrors their package hierarchy, usually with source and class files in separate directory trees.

The parent directory of the class files directory hierarchy should appear on the classpath.

It is quite unusual to get the problem you describe as Java source and class files are usually supplied with their relevant directory paths (e.g. in zip files, or in jar files).

The sooner you start to code, the longer the program will take...
R. Carlson