Eclipse not using jars from add classpath variable

2019-07-24 04:36发布

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?

3条回答
劫难
2楼-- · 2019-07-24 04:53

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.

查看更多
爱情/是我丢掉的垃圾
3楼-- · 2019-07-24 04:56

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!

查看更多
我想做一个坏孩纸
4楼-- · 2019-07-24 05:05

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.

查看更多
登录 后发表回答