Manu Somasekhar wrote:Oopseee Yup Ritchie. You are correct.
sorry that was a mistake....now I will exactly explain my problem.
And
I have Temp.java in package p1 and Temp1.java in package p2 in location E:\important\java programs\packages
then I make Temp.java run using javac -d . Temp.java
and after that I set classpath using command as follows
set classpath=E:\important\java programs\packages
and then i try to compile Temp1.java and it shows the following errors
Temp1.java:2: <identifier> expected
import static p1.Temp.x;
^
Temp1.java:2: '.' expected
import static p1.Temp.x;
^
Temp1.java:7: cannot resolve symbol
symbol : variable x
location: class p2.Temp1
System.out.println(x);
^
3 errors
please tell me wheather I am wrong at any step or not?