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

Package does not exist

S Reddy
Ranch Hand

Joined: May 17, 2007
Posts: 45
I am doing a simple Servlet program. I have my directory structure as

I have given "package valid.fb;" in
And "package valid.act; import java.fb.*;" in

But I am getting error saying that "package valid.fb does not exist". Should I put "valid\fb" in classpath?
Anuradha Karunamuni
Ranch Hand

Joined: Dec 08, 2007
Posts: 64
For this to correctly work set the classpath to "classes\".
If the relative path does not work, set the fully qualified path for the classpath.

"Simplicity is the ultimate sophistication..." ~Leonardo da Vinci~
SCJP 1.4
S Reddy
Ranch Hand

Joined: May 17, 2007
Posts: 45
Thank you Anuradha. Previously, I was thinking classes is on the class path, so I don't need to mention it separately. It was just came to me that it was on the Tomcat's class path, not on my compiler's class path.
I agree. Here's the link:
subject: Package does not exist
It's not a secret anymore!