This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 25376 - ability to create various types of archives and to automatically include resources
Summary: ability to create various types of archives and to automatically include reso...
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 3.x
Hardware: PC Windows XP
: P3 blocker with 5 votes (vote)
Assignee: Tomas Zezula
: 167067 (view as bug list)
Depends on:
Blocks: 41537
  Show dependency tree
Reported: 2002-07-07 18:44 UTC by jnash67
Modified: 2011-08-31 14:05 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description jnash67 2002-07-07 18:44:00 UTC
JBuilder has a really nice archive builder that lets you 
build application, applet, webstart plus various 
additional types of archives. This isn't that difficult 
and often just involves changing the manifest.

Also, JBuilder lets you package resources including class 
files from other archives so that you just have a single 
archive. That way you can limit the number of jars you 
distribute, especially if you're only using a small subset 
of some jars. JBuilder also has the ability to do this 
automatically which should be relatively easily 
accomplished by looking at imports / fully-qualified 

The jarbuilder is one area where netbeans lags 
significantly behind jbuilder.
Comment 1 Marek Grummich 2002-07-22 10:08:18 UTC
Set target milestone to TBD
Comment 2 Jesse Glick 2004-03-19 14:20:50 UTC
J2SE project type in trunk creates one kind of JAR; other project
types will permit others.

Leaving open for suggestions to (at the user's option):

1. Include JARs of required projects in main JAR.

2. Remove statically unreferenced classes.
Comment 3 Jesse Glick 2009-07-07 21:24:57 UTC
*** Issue 167067 has been marked as a duplicate of this issue. ***
Comment 4 Java4Me 2010-08-31 21:01:01 UTC
The current workaround for this is to use the instructions provided in this URL: This will package multiple libraries into a single JAR file. It won't package other resources like the original poster requested.

The problem with these instructions is that they don't work for projects without a main class. I have a shared library that I use among several of my applications. The shared library makes web service calls using JAX-RPC. I need the JAX-RPC libraries compiled into my shared library so that I only have to distribute one JAR. The instructions fail because NetBeans does not copy libraries to the lib folder if there is no main class.

I was able to modify the instructions to have my library compiled into a single JAR. I'm having one problem with it, but it is mostly working. The steps I used are detailed in this post:

Please make sure that when this feature is added it also works for projects that do not have a main class.