如何在Eclipse中正确添加外部库? [英] How to add external library properly in Eclipse?
问题描述
所以今天我下载了 Apache Commons Lang 库(二进制,zip格式)。我将其解压缩到 C:\eclipse\commons-lang-2.5
文件夹。有一个 commons-lang-2.5.jar
,一个 commons-lang-2.5-javadoc.jar
和一个里面有$ code> commons-lang-2.5-sources.jar 以及HTML Javadoc的文件夹。我启动了Eclipse,添加了 commons-lang-2.5.jar
,并将其源代码和Javadoc分别设置为下面的截图。 ( http://img43.imageshack.us/img43/9378/eclipsev.png)
So today I downloaded Apache Commons Lang library (binary, zip format). I extracted it to C:\eclipse\commons-lang-2.5
folder. There are a commons-lang-2.5.jar
, a commons-lang-2.5-javadoc.jar
, and a commons-lang-2.5-sources.jar
inside, and a folder for HTML Javadoc. I started Eclipse, added commons-lang-2.5.jar
, and set its source and Javadoc respectively as the screenshot below. (http://img43.imageshack.us/img43/9378/eclipsev.png)
Eclipse截图http: //img43.imageshack.us/img43/9378/eclipsev.png
我的问题是,是否有方便或标准的方式来添加外部库?或者我实际上做正确的事情?
My question is, is there a convenient or standard way to add external libraries? Or am I actually doing the right thing?
推荐答案
建议:
- 创建一个lib文件夹并将所有的jar保存在文件夹中。
- 随后,将lib文件夹中的所有jar文件添加到构建路径中使用
Project =>属性=> Java Build Path =>库=>添加JAR ...
- Create a "lib" folder and keep all your jars in the folder.
- Subsequently, add all the jar files in the lib folder into your build path by using
Project => Properties => Java Build Path => Libraries => Add JAR ...
btw,没有截图。你可以给屏幕截图的链接,以便我可以帮助我们更好的...
btw, there' no screenshot. Can you give the link for the screen shot so that I may be able to help our better...
这篇关于如何在Eclipse中正确添加外部库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!