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

查看:43
本文介绍了如何在 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"和来源"代表什么?这些 jar 与 '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:


(来源:netbeans.org)

对于不同的 JAR,

  • joda-time-1.6.jar 只包含已编译的类(这是在项目中使用 Joda 所需的 JAR)
  • 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天全站免登陆