• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Unable to import package

Ranch Hand
Posts: 838
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.


Ranch Hand
Posts: 179
Mac Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic