当我尝试导入它们时,添加到 WEB-INF/lib 的 jars 没有被识别:说包不存在 [英] jars added to WEB-INF/lib doesn't get recognized when I try to import them : says the package doesn't exist
问题描述
我已将 org.apache.commons.fileupload
和 org.apache.commons.io
包添加到 WEB-INF/lib
中我的项目目录基于 google appengine.但是当我尝试导入 servlet 文件时,编译器/IDE 给出了一个错误,表明这个包不存在.这是为什么?
I have added org.apache.commons.fileupload
and org.apache.commons.io
package into the WEB-INF/lib
directory of my project based on google appengine. But when I try importing in the servlet files the compiler/IDE gives an error that this package doesn't exist. Why is that ?
添加的 jar 文件:
我收到此错误的原因是什么?我应该怎么做才能解决这个问题?
What can be the reason I am getting this error ? What should I do to solve this problem ?
推荐答案
您可能还需要将它们添加到项目的类路径中.
You might also have to add them to your project's classpath.
对于日食:
右键单击jar,选择构建路径并将其添加到构建路径,然后重试.
Right click the jar, select build path and add it to the build path, then try again.
对于网络豆:
在项目属性窗口中单击左侧面板中的库.在右侧面板中将其添加到编译类路径
in the project properties window click libraries in the left panel. In the right panel add it to the compile classpath
这篇关于当我尝试导入它们时,添加到 WEB-INF/lib 的 jars 没有被识别:说包不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!