Class file contains wrong class, wait on line!!
i am sorry about trouble you guys about this issue, but i have though about it for a long time...
I need to use a interface in /tmp_amd/eno/import/2/jche340/LINUX/course/ass1/util/IConstants.java
In the file ClientStatus.java in
/tmp_amd/eno/import/2/jche340/LINUX/course/ass1/client/ClientStatus.java
I used the command import ass1.util.IConstant; to import this interface
While compiling the java program, i first compile the util program, it works correctly, and then i compiled the ClientStatus program, the error came out.
My command to compile the file in .../ass1/client/ directory is
javac -classpath /tmp_amd/eno/import/2/jche340/LINUX/course *.java
the IConstants locates in ...../ass1/util/IConstants directory
williams % javac -classpath /tmp_amd/eno/import/2/jche340/LINUX/course *.java
ClientStatus.java:6: cannot access ass1.util.IConstants
bad class file: /tmp_amd/eno/import/2/jche340/LINUX/course/ass1/util/IConstants.class
class file contains wrong class: IConstants
Please remove or make sure it appears in the correct subdirectory of the classpath.
import ass1.util.IConstants;
^
1 error

