如何在NetBeans中使用.jar文件? [英] How to use .jar files in NetBeans?

查看:140
本文介绍了如何在NetBeans中使用.jar文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Java开发完全不熟悉所以请耐心等待...

I am completely new to Java development so bear with me...

我已经下载了由三个文件组成的Joda时间库:

I have downloaded the Joda time library which consists of three files:


  • joda-time-1.6.jar

  • joda-time-1.6-javadoc.jar

  • joda-time-1.6-sources.jar

首先,如何在我自己的库中使用这个库NetBeans项目?

Firstly, how do I use this library in one of my own NetBeans projects?

其次,一般来说,上面三个文件之间有什么区别?标签'javadoc'和'来源'表示什么?这些罐子与'joda-time-1.6.jar'库有什么不同?

Secondly, generally speaking, what is the distinction between the three files above? What do the labels 'javadoc' and 'sources' signify? How are these jars different from the 'joda-time-1.6.jar' library?

非常感谢您的帮助。

推荐答案

您可以添加JAR文件到项目中的库:

You would add the JAR file to the Libraries in your project:

alt text http://wiki.netbeans.org/wiki/images/b/b7/Adding_jar_AntlrInNetBeansJavaApplication.jpg

至于不同的JAR,


  • joda-time-1.6.jar 只包含已编译的类(这是您需要的JAR在你的项目中使用Joda)

  • joda-time-1.6-javadoc.jar 包含所有类的文档

  • joda-time-1.6-sources.jar 包含所有类的源代码

  • joda-time-1.6.jar just contains the compiled classes (this is the JAR you need in order to use Joda in your project)
  • joda-time-1.6-javadoc.jar contains the documentation for all the classes
  • joda-time-1.6-sources.jar contains the source code for all the classes

这篇关于如何在NetBeans中使用.jar文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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