for .class files:
If you do NOT specify -classpath or -cp, the java and javac searches current directory by default;
if you do specify -classpath or -cp, java and javac will not search current directory, if any dependent class file is in current directory, you need to include (.) explicitly in the -classpath option.
According to javac document:
-cp path or -classpath path
Specify where to find user class files, and (optionally) annotation processors and source files. This classpath overrides the user class path in the CLASSPATH environment variable. If neither CLASSPATH, -cp nor -classpath is specified, the user class path consists of the current directory.
In Sun's java document:
If -classpath and -cp are not used and CLASSPATH is not set, the user class path consists of the current directory (.).