
The experiments in this folder demonstrate a few ideas. 

First, the role of the classpath in the compiler (javac) command-line
is a bit different from its role in the JVM (java) command-line.

Second, a folder is part of the full package name of a class only if
that folder is part of the package declaration in the class. 

Third, the order of the folder names in the classpath does matter.

In the experiment.cmd script file there is a sequence of command-lines
that demonstrate the above ideas. Here is a brief explanation for each
command-line.

First, compile the two java source files. Notice that the two source
files are both called AB.java, but they are each in a package called 
ab but the two packages are in different folders (the folder a and
the folder b are not part of the package names).

javac  a/ab/AB.java
javac  b/ab/AB.java

Now run the two class files. Notice how the classpath determines which
version of the class ab.AB gets run.

java  -cp a  ab.AB
java  -cp b  ab.AB

The name of the class is ab.AB but the java command lets us use a more
"file like" name (java translates ab/AB into ab.AB for us). This lets
the java command mimic the syntax of the javac command.

java  -cp a  ab/AB
java  -cp b  ab/AB

The next two commands show that the order of the folders in the classpath
matters. The java command stops searching for a class as soon as it finds
a class with the given name.

java  -cp a;b  ab.AB
java  -cp b;a  ab.AB

The next two commands show that the folders a and b are not part of the
full package name for these classes.

java  a.ab.AB
java  b.ab.AB

The next two commands show that the compiler does not use the classpath
when searching for source file to compile.

javac -cp a  ab/AB.java
javac -cp b  ab/AB.java


The name of a Java source file ends in .java (e.g, AB.java or String.java).
The name of a Java class file ends in .class (e.g, AB.class or String.class).
The name of a Java class doe not hav an extension (e.g., AB or String).

The javac command expects the name of a Java source file.
The java  command expects the name of a Java class (NOT a class file).
