Your .java source files can be wherever, they do not need to follow the package hierarchy, you can have every one of them sitting in one directory if you so choose, as long as you compile with javac -d <root of directory structure for class file output> If you do not, the .class file for each .java file is placed in the exact same directory as the .java source it came from.
You have no such liberty with .class file location, whether you are putting them into a jar or accessing them from a directory structure, the .class file needs to be found where its corresponding package says it should be. This is how Java finds things at runtime, so doing anything else is hiding your .class file from java! There are two basic ways to do this, have your .java source files sitting in the appropriate directory structure (which is not otherwise required) or using -d as above to have the java compiler place them where they need to be in terms of the package structure under the target directory you provide.
RTFJD (the JavaDocs are your friends!) If you haven't read them in a long time, then RRTFJD (they might have changed!)