Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pakage does not exist

 
Gopi G
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am getting package does not exist error while compiling the servlet code.
Can you please help me on this..





Thanks in advance..
[ December 31, 2007: Message edited by: Gopi G ]
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"


Thanks for the reply..

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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic