Eclipse不使用添加classpath变量的jar [英] Eclipse not using jars from add classpath variable

查看:139
本文介绍了Eclipse不使用添加classpath变量的jar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我添加了一个classpath变量(通过eclipse的构建路径),指向一个缓存的jar。虽然此文件夹在eclipse的文件夹视图中表示,但由于某些原因,包含的jar不会被识别。



例如,当我导入缓存中的jar中存在的类(从而增加了类路径变量)时,eclipse表示该类无法解析。



任何想法有什么问题,如何解决?

解决方案

您必须确保所需的jar实际上包含在您正在处理的项目的类路径中。右键单击项目,转到属性 - > java构建路径,并确保已将jar添加到项目中。


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?

解决方案

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.

这篇关于Eclipse不使用添加classpath变量的jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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