• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with compilation

 
manda prasad
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

I'am trying to compile the servlet provided as an example for deployment,development,and testing on Page no 81 in HFS.
The compile statement given there,why does it show the servlet-api.jar directory.
I'am not able to compile it,can anyone suggest where am I going wrong.

The message given at the prompt after attempting compilation is :
javac: invalid flag: Files/Apache
Usage: javac <options><source files>
where possible options include : this follows.......

Thanks.
 
ming wu
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yep, I found this example is kind of bugy , here is what i did, maybe stupid but works

Add env variable CLASSPATH = Tomcathome\common\lib\servlet-api.jar;classes;.

examples on book is for unix i think, maybe becouse they wrote the book in Mac?

if you are in windows, I am sure you have to use \ not /
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy,
Yes -- the example works, but you must adjust it for whatever shell syntax you are using, depending on your operating system and your particular shell.

We thought about putting in other examples, but we figured that there were so many different possibilities in shell syntax, that this would make the book more confusing (and longer).

So if you're using Windows (or a different kind of unix shell), you'll need to make the adjustments when you compile, to reflect the different path separators and also to reflect the difference in how you append things to the path on an environment variable.

Next time we'll probably put some other examples at the very front of the book... because this has caused some confusion!

thanks for posting your solution ming,
Kathy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic