Java 库升级问题(1.4到1.8)
其中一个项目是在JDK1.4中开发的,现在我无法在JDK1.8版本中编译 以下错误是由于升级导致的还是缺少一些JARJava 库升级问题(1.4到1.8),java,Java,其中一个项目是在JDK1.4中开发的,现在我无法在JDK1.8版本中编译 以下错误是由于升级导致的还是缺少一些JAR 1. import javax.servlet.http.*; cannot be resolved 2. Base64 is ambiguous 3. HttpServletResponse could not be resolved 4. HttpSession could not be resolved 5. org.w3c.domElement could not be
1. import javax.servlet.http.*; cannot be resolved
2. Base64 is ambiguous
3. HttpServletResponse could not be resolved
4. HttpSession could not be resolved
5. org.w3c.domElement could not be resolved
谢谢。javax.servlet不是SE的一部分,您需要下载EE jdk。出现错误3和错误4的原因与错误1的原因相同:编译时未在类路径中包含servlet API(请参见azurefrog的备注).Error 5看起来像是输入错误:有
org.w3c.dom.Element
,但没有org.w3c.doElement
。我正在使用Ant build.xml来构建项目。我们可以将servlet jar单独包含在JDK中,还是只需要下载EE JDK?我想让它轻一点