Meaningless Drivel is fun!*
The moose likes Beginning Java and the fly likes Unable to import package Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Unable to import package" Watch "Unable to import package" New topic
Author

Unable to import package

Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 815
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

Joined: Feb 10, 2008
Posts: 179

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


-kolli
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to import package
 
Similar Threads
Lomboz problem
Problems with import/package statements
EJB start
HFSJ: Can't compile second version of BeerSelect.java
Head First Design Patterns - Can't run