J
Jack Andersson
I've just created a jar-file containing some classes that I've made. I have
made this jar file in Idea IntelliJ's AntBuild. However, when I try to use
the jar file in a project I get the following message:
cannot access Teleadress.DMP2004.DTDClasses.CompanyResult
bad class file
D:\IdeaProjects\DTDFileTest\lib\DMP2004_DTDClasses.jar(Teleadress/DMP2004/DT
DClasses/CompanyResult.class)
class file contains wrong Class: CompanyResult
Please remove or make sure it appears in the correct subdirectory of the
classpath
The thing is that it works perfectly when I open the jar-file with WinZip
and copy all the class-files to the classes folder in my project. Moreover
when I write Teleadress.DMP2004.DTDClasses. the autocomplete function shows
a list of all my classes including CompanyResult. However, as soon as I
chose CompanyResult it turns red meaning it can't be found. This is also the
case with all the other classes in my jar.
Why is this? I've checked other jars and the only thing that is different is
the manifest-file which in my case is more or less empty.
made this jar file in Idea IntelliJ's AntBuild. However, when I try to use
the jar file in a project I get the following message:
cannot access Teleadress.DMP2004.DTDClasses.CompanyResult
bad class file
D:\IdeaProjects\DTDFileTest\lib\DMP2004_DTDClasses.jar(Teleadress/DMP2004/DT
DClasses/CompanyResult.class)
class file contains wrong Class: CompanyResult
Please remove or make sure it appears in the correct subdirectory of the
classpath
The thing is that it works perfectly when I open the jar-file with WinZip
and copy all the class-files to the classes folder in my project. Moreover
when I write Teleadress.DMP2004.DTDClasses. the autocomplete function shows
a list of all my classes including CompanyResult. However, as soon as I
chose CompanyResult it turns red meaning it can't be found. This is also the
case with all the other classes in my jar.
Why is this? I've checked other jars and the only thing that is different is
the manifest-file which in my case is more or less empty.