如何在Netbeans中从特定包(没有main)创建.jar? [英] How to create .jar from specific package (without main) in Netbeans?

查看:207
本文介绍了如何在Netbeans中从特定包(没有main)创建.jar?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有很多类似的问题,但没有具体的问题。我有一个包含大量软件包的Netbeans项目。只有一个有Main。我希望能够从其中一个包(当然包含它包含的所有类)创建一个.jar,它没有main。

There are a lot of similar questions, but none for this specifically. I have a Netbeans project with a bunch of packages. Only one has Main. I'd like to be able to create a .jar from just one of the packages (and all the classes it contains, of course), which doesn't have main.

这是否可行而无需将该软件包放在另一个项目中或不必使用build.xml?如果是后者,任何简单的方法或好的rtfm链接?

Is this feasible without having to put that package in another project or without having to screw around with build.xml? If the latter, any easy way or good rtfm links?

关键是我正在开发大学申请的一部分,每个小组成员正在开发一个类别的模块。如果每个人都可以提供他们的.jar,那么主要项目可以包括罐子并使用它们。我猜测罐子里的所有主管都不会真的受伤吗?但仍然......

The point is i'm developing part of an application for college, each group member is developing a module of sorts. If each could provide their .jar the main project can just include jars and use them. I'm guessing all the mains in the jars wouldn't really hurt? But still...

推荐答案

您可以使用项目属性来自定义项目的jar文件内容。此屏幕截图显示了Java类库项目的外观。

You can use the project properties to customize your project's jar file content. This screenshot shows what it looks like for a Java Class Library project.

这篇关于如何在Netbeans中从特定包(没有main)创建.jar?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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