File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes compilation problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "compilation problem" Watch "compilation problem" New topic
Author

compilation problem

Ravi kapa
Ranch Hand

Joined: Jan 05, 2012
Posts: 31
Hi,i was developed a beerselection web app which is in head first servlets and jsp book.
this regard i used to create 2 packages one is having BeerExpert.
class(BeerExpert class is execouted) and another is having BeerSelect but is the main problem when iam trying to compile servlet having BeerSelect class file compiler is showing Errors...

1.cannot find symbol BeerExpert
2.cannot find symbol model

I set classpath to --->C:\Program Files (x86)\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar

and BeerExpert.class file is in --->C:\Program Files (x86)\Apache Software Foundation\Tomcat 5.5\webapps\Beer\WEB-INF\classes\com\example\model\BeerExpert.class
cmd prompt is with c:\users\ravi\desktop>

servlet code
------------------

Plain old java class
------------------------


can any one suggest me...


[Edit - added code tags and formatted - see UseCodeTags]
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 3140
Welcome to the Ranch, Ravi!

This is wrong:


You need to either import a specific class, or use the wildcard import


The first one is generally preferred as it makes it clear which classes are coming from which packages.

Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 3140
Ravi kapa wrote:
2.cannot find symbol model


People will be better able to help you if you indicate clearly which line is causing the problem.
Ravi kapa
Ranch Hand

Joined: Jan 05, 2012
Posts: 31
i done what you said but it still not compiling...i think the compiler is not finding that class or package....
Ravi kapa
Ranch Hand

Joined: Jan 05, 2012
Posts: 31
my web app
got compiled.....
 
 
subject: compilation problem
 
Threads others viewed
package com.example.model does not exist
weird problem
File not getting imported
Regarding Package
Problem in accessing model in diffeerent package(Servlet-HFS)
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture