Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Package does not exist

 
S Reddy
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
S Reddy
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic