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

Not being able to compile Chapter 1 Servlet on page 30

 
Tontang Bei
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I am having trouble compiling the code given on page 30-31 in HFSJ. I have setup my folder directory as directed. I am in d:\project1. from there I type this:

D:\project1>javac -classpath \c:\Apache group\tomcat4.1\common\lib\servlet-api.jar -d classes src\Ch1Servlet.java

the error message I get is:
javac: invalid flag: group\tomcat
Usage: javac <options> <source files>

This is classpath issue? how can I solve?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note that the path contains a space betwen "Apache" and "group". You need to enclose the whole path in double quotes, otherwise the space character is interpreted as a delimiter between parameters.
 
Scott Langenes
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf,
I had the same problem too. Sometimes I can't see the forrest for the trees.
 
Anupama Ponnapalli
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
since this is not scjp, you could use ant.

http://docs.google.com/Doc?id=dhc7k98_13fmr2qn
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic