Firstly I think you have a typo in your 2nd class:
You can use the -cp or -classpath command to compile and run the program.
How to do this depends on the file directories your calsses reside in, but here is an example:
Compile class in directory c:\_APIContents normally
Now let's test it, the following class is in c:\_APIContents2 and is compiled and run from c:\_APIContents2
We can use the -classpath option, (shorthand version is -cp), to tell the compiler where to find any dependencies we need to compile our TestATestPackage test class.
Save and compile the TestATestPackage test class in directory c:\_APIContents2 using the following command:
What the above command is saying is compile the TestATestPackage class and look for any dependencies in subdirectories of c:\
We also have to let the intepreter know where our package is and the following typed on the command line will do this:
What the above command is saying is run the TestATestPackage class from package _APIContents2 which is within a subdirectory of the c:\ drive.
Notice how we use dot notation to qualify the TestATestPackage class within the _APIContents2 package, just as you would use it within a java class.