• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compile Servlet

 
priya rishi
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • 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.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thanks, it compiles successfully.
now,i know the power of "" in classpath.


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic