This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes importing package not being recognised Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply 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: 14672
    
  11

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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: importing package not being recognised
 
Similar Threads
HFSJ- Chap 3
Ch3 Excercise in HFJS
can't import own model
can't compile a servlet
Problem in accessing model in diffeerent package(Servlet-HFS)