当前位置: 技术问答>java相关
package javax.servlet does not exist?
来源: 互联网 发布时间:2017-03-24
本文导语: 我在cmd窗口中用javac SqlBridge.java编译我自己写的javabean,bean中import javax.servlet.*;但在编译时出错:package javax.servlet does not exist, 我用的是j2sdk1.4.0_02,tomcat4.1.12, JAVA_HOME: c:j2sdk1.4.0_02 TOMCAT_HOME: c:tomcat4 classpath:...
我在cmd窗口中用javac SqlBridge.java编译我自己写的javabean,bean中import javax.servlet.*;但在编译时出错:package javax.servlet does not exist,
我用的是j2sdk1.4.0_02,tomcat4.1.12,
JAVA_HOME: c:j2sdk1.4.0_02
TOMCAT_HOME: c:tomcat4
classpath: .;c:j2sdk1.4.0_02libtool.jar;c:j2sdk1.4.0_02libdt.jar;%TOMCAT_HOME%lib;%TOMCAT_HOME%commonlibservlet.jar;c:j2sdk1.4.0_02jrelibrt.jar
我用的是j2sdk1.4.0_02,tomcat4.1.12,
JAVA_HOME: c:j2sdk1.4.0_02
TOMCAT_HOME: c:tomcat4
classpath: .;c:j2sdk1.4.0_02libtool.jar;c:j2sdk1.4.0_02libdt.jar;%TOMCAT_HOME%lib;%TOMCAT_HOME%commonlibservlet.jar;c:j2sdk1.4.0_02jrelibrt.jar
|
试试,把servlet.jar复制到JAVA_HOMELIB
|
把servlet.jar复制到JAVA_HOMELIB 然后在加到classpath