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 Import error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Import error" Watch "Import error" New topic

Import error

Lydia Su

Joined: Apr 27, 2001
Posts: 13
i have the javabook package but the compiler keeps giving me an error "Package javabook not found in import"
why does it keep giving me this???
Junilu Lacar

Joined: Feb 26, 2001
Posts: 6529

check CLASSPATH and make sure that it includes the correct path to javabook. If your java program is in the same directory as javabook, be sure to include ".;" in your CLASSPATH string.

[This message has been edited by JUNILU LACAR (edited May 25, 2001).]

Junilu - [How to Ask Questions] [How to Answer Questions]
Lydia Su

Joined: Apr 27, 2001
Posts: 13
i tried that, it didn't work...
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

If your javabook package is jar'd up, you have to include the actual jar name (add the end of the proper path) in your classpath. Maybe that's it?

Also, if you're using an IDE of some sort, be aware that not all of them use system classpath settings. You would need to look for something like a 'library' to add jars to, or something similar.
[This message has been edited by Mike Curwen (edited May 29, 2001).]
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
It SOUNDS like your import statement is coded wrong. Can you show us what you coded, AND what your actual classpath is?

"JavaRanch, where the deer and the Certified play" - David O'Meara
I agree. Here's the link:
subject: Import error
It's not a secret anymore!