wood burning stoves 2.0*
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
Author

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
classes\valid\fb\InputForm.java
classes\valid\act\Validate.java

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

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Package does not exist