Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!

# Pakage does not exist

Gopi G
Greenhorn
Posts: 9
Hi,

I am getting package does not exist error while compiling the servlet code.

[ December 31, 2007: Message edited by: Gopi G ]

Ulf Dittmer
Rancher
Posts: 42969
73
Those missing classes can't be found if you compile from within the .../web/ directory, and are not using the classpath option. The easiest would be to compile from within the D:\Gopi\SCWCD\src directory, using a command like "javac com\example\web\CoffeeSelect.java"

Gopi G
Greenhorn
Posts: 9
Originally posted by Ulf Dittmer:
Those missing classes can't be found if you compile from within the .../web/ directory, and are not using the classpath option. The easiest would be to compile from within the D:\Gopi\SCWCD\src directory, using a command like "javac com\example\web\CoffeeSelect.java"

I have tried to compile it in under Gopi\SCWCD. Then also I am getting the same error. Can you please tell me which classpath option I have to use for compile CoffeeSelect.java .

Ulf Dittmer
Rancher
Posts: 42969
73
I was assuming that CoffeEexpert.java has been compiled before, and that CoffeeExpert.class is available in the src/com/example/model directory.

Also note that you should not compile in the Gopi\SCWCD directory (as you said you did) but rather in Gopi\SCWCD\src (which I mentioned in the previous post).

You can also compile both classes in one go by issuing the command

This may be the easiest way.