Hi Jerry,
java or javac searches for given class in the fallowing manner
1) first it will search in java lib files
2) it will search in OS environment variables ex: CLASSPATH
3) next if you specify any classpath then it will search there.
Remember this override the Os env paths.
In your case
step 1) you are overriding Os classpath by having your own in java cmd.
But there is no "." after path.
thats why it will say i don't know xyz dir.
step 2) when you compile with java xyz/C, you are able to complie. This means your Os classpath has "." some where.
Hope you clarified.