如何简单地将jar文件添加为Netbeans模块套件中的库? [英] How to simply add jar files, as libraries in a Netbeans module suite?

查看:116
本文介绍了如何简单地将jar文件添加为Netbeans模块套件中的库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对NetBeans(版本6.5和6.7)感到有些困惑.我有一个NetBeans模块套件应用程序,其中包含几个NetBeans模块.我需要在其中一个模块中添加一些代码.新代码正在使用一个库,并以几个jar文件的形式分发.

I'm a bit confused with NetBeans (versions 6.5 and 6.7). I have a NetBeans Module Suite application, which consists of several NetBeans Modules. I need to add some code in one of the modules. The new code is using a library, distributed as several jar files.

问题是,NetBeans不允许我将此库jar直接添加到类路径.它希望将所有的jar包装在一个新的Library Wrapper Module中,然后将其添加到项目中并从那里使用.效果是,所有原始的jar都由NetBeans自动组合到一个新的jar中.这是一个问题,因为稍后我不能只更换罐子,而不必重建此库包装模块",并且原始库每晚都会更新.

The problem is, that NetBeans does not allow me to add this library jars directly to the classpath. It wants to wrap all the jars in a new Library Wrapper Module, which is then added to the project and used from there. The effect is that all the original jars are combined into a single new jar automatically by NetBeans. This is a problem, because I can't just replace the jars later, without rebuilding this "Library Wrapper Module" and the original library is updated nightly.

我阅读了一些NetBeans论坛,但没有发现任何内容...我尝试了简单的Java应用程序,可以使用Project Properties-> Libraries-> Add JAR/Folder将jar添加到类路径中.如果您使用NetBeans模块而不是简单的应用程序,则库"对话框看起来会有所不同,并且没有添加JAR/文件夹"按钮.

I read some NetBeans forums, but I found nothing... I tried with simple java application, where it is possible to simply add jar(s) to the classpath using Project Properties -> Libraries -> Add JAR/Folder. If you use a NetBeans module instead of a simple application, the Libraries dialog looks different and does not have the "Add JAR/Folder" button.

是否可以在NetBeans模块中添加普通的jar,怎么做?

Is it possible to add a plain normal jar in a NetBeans module and how?

推荐答案

在NetBeans 6.8中,似乎用户可以包装jar的方式已更改.

It looks like the way a user can wrap a jar has changed in NetBeans 6.8.

由于已将其集成到项目的属性对话框中,因此构建过程也可能更智能.看来这是您的主要担心....

Since this has been integrated into a property dialog of a project, the build process might be smarter, too. And it seems like that was your primary concern....

这篇关于如何简单地将jar文件添加为Netbeans模块套件中的库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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