| 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
|
|
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
|
 |
 |
|
|
subject: importing package not being recognised
|
|
|