I am following Head First: Servlet and JSP
and I was writing my first Servlet.
I tried to compile it using command line and I got an error that package javax.servlet
does not exist.
So far, I have set the JAVA_HOME
variable to the value: C:\Program Files\Java\jdk1.7.0_11
and the PATH
variable also to C:\Program Files\Java\jdk1.7.0_11\bin
How do I get the javax.servlet
package?
Also, I have installed JDK 7 update 11
after the applet bug that was being exploited.
I have both JDK Update 11
and JDK Update 9
installed.
Should I get rid of Update 9
or is it not needed ?
Misc
Operating System: Windows 7 Home Premium 32 bit
What I also tried:
javac -cp .;D:\Program Files\apache-tomcat-7.0.35-windows-x86\apache-tomcat-7.0.35\lib\servlet-api.jar Ch1servlet.java
I tried both forward slash AND backward slash. In both the cases I got an invalid flag error.