This is what i do not understand. Why Java cannot locate the parent.class when i am using absolute path (D:\LearnJava\One) in CLASSPATH but specifying D:\ works ?
Is it trying to locate the package (not covered in my classpath) then only the class in the package (covered in the classpath) ?
The classpath is used to specify the location of the root of the class files -- not the location of the class files. So if you specify the class path as D:\LearnJava\One and you specify the package as LearnJava.One, then it will look for the class file in D:\LearnJava\One\LearnJava\One\Parent.class.