• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Compile Servlet

 
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello,
i am studying hfsj chapter 1 and tried to compile demo in pg 30 of the book.

i am stuck there, where i have to compile

tomcat exists in this path --- C:\Tomcat5.0\Tomcat 5.0\common\lib

my javac command is : javac -classpath C:\Tomcat5.0\Tomcat 5.0\common\lib\servlet-api.jar -d classes src\Ch1Servlet.java

after this error message-invalid flag 5.0\common\lib\servlet-api.jar
any help is appreciated.
thanks.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The command line doesn't like spaces in the path. Try again with : javac -classpath "C:\Tomcat5.0\Tomcat 5.0\common\lib\servlet-api.jar" -d classes src\Ch1Servlet.java
 
priya rishi
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, it compiles successfully.
now,i know the power of "" in classpath.


reply
    Bookmark Topic Watch Topic
  • New Topic