添加到WEB-INF / lib的jar文件在我尝试导入时无法识别:说包不存在 [英] jars added to WEB-INF/lib doesn't get recognized when I try to import them : says the package doesn't exist

查看:335
本文介绍了添加到WEB-INF / lib的jar文件在我尝试导入时无法识别:说包不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将 org.apache.commons.fileupload org.apache.commons.io 包添加到 WEB-INF / lib 基于google appengine的项目目录。但是当我尝试导入servlet文件时,编译器/ IDE会发出错误,指出此包不存在。为什么?



添加 jar 文件:





我得到这个的原因是什么?错误?我该怎么做才能解决这个问题?

解决方案

您可能还需要将它们添加到项目的类路径中。

eclipse的



右键单击jar,选择构建路径并将其添加到构建路径,然后重试。 / p>

对于netbeans:



在项目属性窗口中单击左侧面板中的库。在右侧面板中,将其添加到编译类路径


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 ?

The jar files added :

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.

for eclipse:

Right click the jar, select build path and add it to the build path, then try again.

for netbeans:

in the project properties window click libraries in the left panel. In the right panel add it to the compile classpath

这篇关于添加到WEB-INF / lib的jar文件在我尝试导入时无法识别:说包不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆