为什么Eclipse没有看到库的.jar文件? [英] Why Eclipse does not see .jar file of a library?

查看:497
本文介绍了为什么Eclipse没有看到库的.jar文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个java项目,其中有Referenced Libraries。在Referenced Libraries中我有一个我使用的库的.jar文件(我只使用一个外部库)。

I have a java project in which I have "Referenced Libraries". In the "Referenced Libraries" I have a .jar file of a library that I use (I use only one external library).

当我尝试运行 - >运行我有一个NullPointerException的代码。根据我以前的经验,我知道它(非常可能),因为我的代码没有看到库。

When I try to "Run -> Run" the code I have a NullPointerException. From my previous experience I know that it it (very likely) because my code does not see the library.

我刚刚开始使用Eclipse,它可能是我没有以正确方式连接库。我应该使用一些选项或其他操作来强制Eclipse查看库的.jar文件吗?

I just started to use Eclipse and it can be the I do not "connect" libraries in a correct way. Should I use some options or additional action to force Eclipse to see the .jar file of the library?

已添加:

通过右键单击库我得到一个下拉菜单,其中我看到构建路径。我需要在那里做点什么吗?

By the right click on the library I get a drop-down menu in which I see "Build Path". My be I need to do something there?

推荐答案

你试过这个吗?
http:/ /www.wikihow.com/Add-JARs-to-Project-Build-Paths-in-Eclipse-%28Java%29

添加库到你的构建路径:]

Add the library's to your build path :]

这篇关于为什么Eclipse没有看到库的.jar文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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