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 ?

Ls chin
Ranch Hand

Joined: Jun 28, 2008
Posts: 99

I have a java file called "" in
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\Beer-v1\WEB-INF\classes\com\example\model

I have another java file called "" in
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\Beer-v1\WEB-INF\classes\com\example\web

In, I have a code import com.example.model.*;

When I compile the file it gives the error:

package com.example.model does not exist.
import com.example.model.*;

I hope I've set my classpath correctly.

C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar.;
C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\jsp-api.jar.;
C:\Program Files\Java\jdk1.6.0_06\lib.;c:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\beer-v1\WEB-INF\classes

All opinions and suggestions are welcomed. Thank you.

EDIT : Please ingore this post. I found the answer!!! Immediately after I posted this topic, I noticed that the "beer-V1" was in small letter instead of capital letter "B".

The classpath was wrong. argh.

[ October 16, 2008: Message edited by: LS chin ]
I agree. Here's the link:
subject: Package does not exist ?
It's not a secret anymore!