Can't add external zip (java.lang.NoClassDefFoundError) [message #189192] |
Wed, 04 February 2004 03:16  |
Eclipse User |
|
|
|
Originally posted by: mmcvea.ualberta.ca
Hi,
I'm doing some java for a class at school and for our programs they require
us to use a classes from their c115.zip file. This zip file imports without
a problem into codewarrior which is what we use at school but I want to
include the classes into the JRE system library. To do this I added the zip
file to my java\j2re1.4.2_01\ directory and added the zip file to the
standard JRE system libraries. I also added the zip file path to the
classpath variables. I did all this through Eclipse and it seems to work
fine. The c115 package shows up as a part of the JRE system libary in the
Package explorer and all the classes are there. When I import the package
into a class I can type ' import c115. ' and it will present me with the
options of 'keyboard' or 'structure', those being the folders in the zip
file to organize the classes. When I examine the c115.zip in the package
explorer it shows the keyboard and structure packages and their classes
inside, as well as the methods and static variables for each.
However, when I try to run the project, I get 2 errors: one saying "the
project was not built since its classpath is "incomplete. Cannot find the
class file for keyboard...", and "this compilation unit indirectly
references the missing type Keyboard..." Also when I look at the java file
in question the keyboard object I use does not present an error, and the
'import c115.keyboard.*'; has the warning that it is not used.
I am at a loss as to what is going wrong, or how to fix it. Do I need to
convert the zip to a jar and if so, how do I do this? Is the structure of
the archive wrong? within the c115.zip are 2 folders: keyboard and
structure, and within them are the relevant .class files.
Any help would be appreciated.
Thanks,
Mark
|
|
|
|
Powered by
FUDForum. Page generated in 0.03650 seconds