• 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:
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

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: 43024
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic