This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to complie  RSS feed

 
hemant chaudhary
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
using this command :

javac -classpath "C:\Program Files\Apache Software Foundation\apache-tomcat-6.0.13\lib\servlet-api.jar":classes:. -d classes src\com\NameSelect.java

Errors I am getting like this:

e.g. :

src\com\NameSelect.java:3: package javax.servlet does not exist
import javax.servlet.*;

As far as I know everything is correct in path. I have installed new tomcat and servlet-api.jar is there in lib.

Please suggest a solution.
 
hemant chaudhary
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry to bother you people ...corrected the mistake.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try enclosing the complete classpath in double quotes, and not just part of it. Also, since you're on Windows, the delimiter that separates classpath entries is ";", not ":" (that's for Unix-like operating systems).
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!