I am using apache-tomcat server and I have already set classpath and Jdk path by environment variable. When I'm compiling my servlet as
C:>cd Users\him\applications\tomcat 5.5\webapps\myproject
c:>javac -classpath "Users\him\applications\tomcat 5.5\common\lib\servlet-api.jar";classes:. -d classes src\com\example\web\MyServlet.java
I am getting error like...
cannot find symbol
symbol : class HttpServlet
can anyone tell me what is the source of error.
thanks in advance........................................
I am using apache-tomcat server and I have already set classpath and Jdk path by environment variable
If you have already set the classpath then why are you still refering it during compilation. Its better to remove it from environment variable or to remove it from your compilation command. (Here i am talking about the servlet-api.jar)
In general during these situations the best way to setup an environment is to use a .bat, .cmd or a .sh file and set everything in that rather than messing up with the environment variable. In that way you have better control over the current command prompt.