This week's giveaways are in the MongoDB and Jobs Discussion forums.
We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line!
See this thread and this one for details.
The moose likes Java in General and the fly likes package does not exists error Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "package does not exists error" Watch "package does not exists error" New topic
Author

package does not exists error

rameshmca rk
Greenhorn

Joined: Jan 27, 2007
Posts: 17
Hi,
When I tried for compiling servlet,that has a POJO(model) creation in its code,I got "package does not exists" error for the POJO even though I gave the import statement.Also I have specified the classpath for the POJO.How can I resolve this problem?

Thank and regards,
Ramesh RK
Jesper de Jong
Java Cowboy
Bartender

Joined: Aug 16, 2005
Posts: 12907
    
    3

This error can only mean one (or more) of these problems:

1. You did not import the package correctly.
2. The package is not on the classpath correctly while compiling.
3. The directory structure does not match the full package name.
4. The package statement in the POJO class is not correct.

Check all these things.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Animesh Saxena
Ranch Hand

Joined: Jan 15, 2006
Posts: 62
try giving the classpath while compiling. Also the only possible error can be directory strucuture.


Animesh Saxena<br /> <br />Open Source Developer
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: package does not exists error
 
Similar Threads
package& jar file
servlet compilation error.
jaxb.properties problem with struts
package call
unnable to create object of a class..