Suppose I have the following packages:
<classpath>\dir01\subdir01 : contains File1a.java, File1b.java
both of which are specifying
package dir01.subdir01;
<classpath>\dir01\subdir02 : contains File2a.java, File2b.java
both of which are specifying
package dir01.subdir02;
Suppose further that I want to:
1. Move all 4 java files into the dir01 directory.
2. Eliminate subdir01 and subdir02.
3. Continue to have File1a.java and File1b.java in their own NAMED package.
4. Continue to have File2a.java and File2b.java in their own NAMED package.
5. Have the package that contains File1a, File1b be distinct from the package
that contains File2a, File2b.
From the concepts that I have gleaned from classpath, import, and package, the
above is NOT do-able. Does anyone disagree?
You are right that it is not doable if you are storing the class files in file system and letting the JVM load the classes for you. However, if you load the classes yourself then it is doable because - "A class file can be stored anywhere - even in database."