Eclipse not using jars from add classpath variable

不问归期 提交于 2019-12-24 02:33:09

问题


I added a classpath variable (via eclipse's build path) that points to a cache of jars. While this folder is represented in eclipse's folder view, the contained jars are not recognized for some reason.

For example, when I import a class that is present in a jar in the cache (and thus the added classpath variable), eclipse indicates that the class can not be resolved.

Any ideas what is wrong and how to resolve it?


回答1:


You have to make sure that the jar(s) that you want are actually included in the classpath of the project you're working on. Right-click on the project, go to properties -> java build path and make sure you've added the jar to your project.




回答2:


I think this is the problem you are having : https://bugs.eclipse.org/bugs/show_bug.cgi?id=70417

So go vote for the enhancement - it's the only way things like this get done!




回答3:


I too struggled with the same problem and finally got the solution for it. Just copy the jar's in your server's lib folder eg)apache tomcat's lib folder and then run the project.



来源:https://stackoverflow.com/questions/3181570/eclipse-not-using-jars-from-add-classpath-variable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!