your 1st package is package com10;and 2nd you imported Prg.com10.*; it should be imported com10.*; and in command line suppose you are in the c:\) javac -cp Prg Prg\com11\test1.java java -cp Prg com11.test1
But, I am not clear on how we need to determine what should go into the import statements when there are subpackages also. What is the directory structure we need to follow?
For example, I further created the following packages under com10: (1) TestPkg under com10 (2) Internal under TestPkg; Internal contains test3.java.
Now, if I want to instantiate test3.java inside my original test1.java, what should be my import statements and classpath settings? I tried some of the options based on what I understood, but I get errors like "package TestPkg.Internal does not exist"