• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Not being able to compile Chapter 1 Servlet on page 30

 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ulf,
I had the same problem too. Sometimes I can't see the forrest for the trees.
 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
since this is not scjp, you could use ant.

http://docs.google.com/Doc?id=dhc7k98_13fmr2qn
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic