Thanks for the excellent help. I was led astray by SCJP 6 ( Raposa ) page 19 where it states
You might have also noticed that the source code files in \src use the same directory
structure as their package names. This is not a requirement for your .java files; they can
be stored in any directory.
Moved the source to pkg1/Qwerty.java and everything is peachy.
I've been struggling with this for a day or two now and cannot seem to grasp what is going on.
The following code allows me to create a reference to the public class JOptionPane. As the wildcard import includes all the types in the package.the full class name is not needed.
If I create a public class in a pkg :
and then try to create a reference the compiler chokes :
Sample run :
I can't figure out why it fails and why is it referring to the source file ? The file pkg1/Qwerty.class exists. CLASSPATH is not set and so includes the current directory.