This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes problem in compilation of servlet in apache-tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "problem in compilation of servlet in apache-tomcat" Watch "problem in compilation of servlet in apache-tomcat" New topic
Author

problem in compilation of servlet in apache-tomcat

Himanshu Daurbi
Greenhorn

Joined: Nov 09, 2011
Posts: 4
Hello friends,
I am using apache-tomcat 5.5.17 and jdk 1.6 . I have already set path of jdk using environment variable. I am deploying a servlet on it after starting server. I have already made directory structure in desktop. I am compiling my program using statement in command prompt.

C:>cd Users\him\desktop\project //here is my directory structure
C:>javac - classpath \Users\him\applications\tomcat 5.5\common\lib\servlet-api.jar;classes:. classes src\com\example\web\myservlet.java

and I'm getting error like this----
javac : invalid flag: 5.5\common\lib\servlet-api.jar;classes:.


I'm waiting for your response and thanks in advance...........
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38463
    
  23
Have you got a space after the -?
Have you got a space before 5.5? If you need a space before 5.5, then the whole classpath should be enclosed in "quotes".
Himanshu Daurbi
Greenhorn

Joined: Nov 09, 2011
Posts: 4
Hi Ritchie,
Thanks so much to you. My program is working correctly now.

Thanks & Regards,
Himanshu Daurbi
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38463
    
  23
“You’re welcome”, and well done
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38463
    
  23
. . . and welcome to the Ranch I hadn’t noticed you are new.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in compilation of servlet in apache-tomcat