aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Compile Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Compile Servlet" Watch "Compile Servlet" New topic
Author

Compile Servlet

priya rishi
Ranch Hand

Joined: Oct 26, 2008
Posts: 119
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.


SCJP 5 , SCWCD 5
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

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


[My Blog]
All roads lead to JavaRanch
priya rishi
Ranch Hand

Joined: Oct 26, 2008
Posts: 119
Thanks, it compiles successfully.
now,i know the power of "" in classpath.


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Compile Servlet