File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Package fustration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Package fustration" Watch "Package fustration" New topic

Package fustration

Rik Abel

Joined: Nov 24, 2003
Posts: 7
I need help with packages.

I totally understand the whole point of importing, but what can you do if you get "package ... does not exist" when you are importing a package that you think does exist?

Is there a command or check you can run to see if a package has been created or exists?

This is frustrating because I'm copying examples out of the Head first Servlets and JSP book, have done everything as required (Page 85 of book) when it comes to importing a package called com.example.model.*; I get told this package doesn't exist! but the directory does exist, with the file which needs to be imported, so I'm assuming the package should.

So if I know the directory exists, how can I debug this problem?

Any help/suggestions would be much appreciated.
Horatio Westock
Ranch Hand

Joined: Feb 23, 2005
Posts: 221
This sounds like a classpath problem - have you checked that your classpath includes the package in question?
Rik Abel

Joined: Nov 24, 2003
Posts: 7
Cheers, it was a classpath issue alright.

Read some stuff about how multiple classpaths can be set, seperate them with a ';' (in Windows).

This link was useful to me:

I agree. Here's the link:
subject: Package fustration
It's not a secret anymore!