• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Package does not exist ?

Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have a java file called "BeerSelect.java" 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 "BeerExpert.java" in
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\Beer-v1\WEB-INF\classes\com\example\web

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

When I compile the BeerSelect.java 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 ]
Just the other day, I was thinking ... about this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic