aspose file tools*
The moose likes Beginning Java and the fly likes importing package not being recognised Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "importing package not being recognised" Watch "importing package not being recognised" New topic
Author

importing package not being recognised

Paul Mackellar
Greenhorn

Joined: Jun 03, 2010
Posts: 4
I am trying to compile a servlet which has an imported package.



and this is the imported package



when i try to compile i am getting the following errors and can't work it out.



can anyone help?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Try to add the folder where the "com" package is to your classpath :
javac -cp src -d classes src/com/example/web/BeerSelect.java

Also, you'll need to add the servlets api jar file to your classpath. Check this FAQ.


[My Blog]
All roads lead to JavaRanch
Paul Mackellar
Greenhorn

Joined: Jun 03, 2010
Posts: 4
Christophe Verré wrote:Try to add the folder where the "com" package is to your classpath :
javac -cp src -d classes src/com/example/web/BeerSelect.java

Also, you'll need to add the servlets api jar file to your classpath. Check this FAQ.


Thanks that worked
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: importing package not being recognised
 
Similar Threads
HFSJ- Chap 3
Ch3 Excercise in HFJS
can't import own model
Problem in accessing model in diffeerent package(Servlet-HFS)
can't compile a servlet