如何为 NetBeans 6.7.1 安装 jGroups
新手问题 - 我正在使用 NetBeans 6.7.1(刚刚安装)并想使用 jGroups 编写一个应用程序...
从示例中我需要导入 org.jgroups.*,但在 NetBeans 中我收到以下错误: org.jgroups 包不存在
所以,上网下载 jGroups(src 和 bin),一直试图找出如何让它工作,但我所做的似乎都没有解决问题。
有人能指出我正确的方向吗?我应该在 NetBeans 中放置哪些文件以及需要更改哪些内容才能使其开始工作?
谢谢,
Newbie question - I am using NetBeans 6.7.1 (just installed it) and wanted to write an application using jGroups ...
From the sample I need to import org.jgroups.*, but in NetBeans I get the following error:
package org.jgroups does not exist
So, went on the net and download jGroups (src and bin), been trying to figure out how to get it to work but nothing I do seems to solve the problem.
Anyone able to point me in the right direction? What files do I put where and what do I need to change in NetBeans so that it starts to work?
Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要将 jGroups 添加为 NetBeans 库。
从菜单中选择“工具”>库。 (请注意,在旧版本中,它称为
工具 > 组件库
。)单击“
新建库...
”对于
库名称
,输入图书馆的名称。例如:jGroups
对于
Library Type
,选择Class Libraries
单击
OK
选择
Classpath
选项卡并使用Add JAR/Folder...
按钮添加 jGroups jar。同样,使用
Sources
选项卡和Javadoc
选项卡添加源(用于调试)和 JavaDocs(用于自动弹出文档)。如果您没有源代码和/或 JavaDoc,它仍然会为您提供代码补全,只是不会提供调试文档。所有这些都将 jGroups 定义为一个库,并使其可供 NetBeans 使用。
现在,了解项目的属性。选择
Libraries
,单击Add Library...
并选择jGroups库。You need to add jGroups as a NetBeans library.
From the menus, select
Tools > Libraries
. (Note in older releases it was calledTools > Component Libraries
.)Click "
New Library...
"For
Library Name
, enter a name for the library. Eg:jGroups
For
Library Type
, selectClass Libraries
Click
OK
Select the
Classpath
tab and add the jGroups jar(s) using theAdd JAR/Folder...
button.Likewise, use the
Sources
tab andJavadoc
tab to add the sources (for debugging) and the JavaDocs (for auto popup documentation). If you don't have the source and/or JavaDoc, it will still give you code completion, just not the documentation of debugging.All of that defines jGroups as a library and makes it available to NetBeans.
Now, got to you project's properties. Choose
Libraries
, clickAdd Library...
and select the jGroups library.