• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to import package

 
Rob Hunter
Ranch Hand
Posts: 832
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I've got this third party zip file that (when extracted) contains a directory with 3 directories underneath it and in each of these directories there are a bunch of ".class"es. It's my first time using Eclipse so here's what I'm getting :
My project is stored (for example) underneath C:/EclipseWS. The current class I'm writing is called dbConnect.java and it will be stored in the package tstpck.dbsuper (so C:\EclipseWS\tstpck\dbsuper).
The third party zip file I extracted into the C:\temp\thirdparty\ directory and it's called (again, for example) ajavazip.zip.
In my class at the top I try and put something like ajavazip.nextdirectory.* but the ajavazip part gets underlined and Eclipse complains (The import ajavazip cannot be resolved). Can anyone tell me what I'm leaving out or doing wrong? I tried adding a CLASSPATH variable in system Environment variables (setting it to C:\temp\thirdparty) but it didn't do anything. Any help would be greatly appreciated.

C:/temp/thirdparty/ajavazip.zip
C:/Eclipse/tstpck/dbsuper/class_im_trying_to_use_import_in.java


Rob
 
Ravikanth kolli
Ranch Hand
Posts: 179
Chrome Eclipse IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as i could understand what you are talking about you should include the zip in the build path of the project.

In eclipse right click the project -> and in build path -> configure build path and you can add external jars and zip files that you would like to use in your project.

hope this helps
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic