An Alternative to the jar Program
The jar program that comes with the JDK certainly does its job, but it definitely has some drawbacks. As your JAR files grow larger, it’s probably going to become a nuisance that you can’t add or delete entries individually, and having to deal with a separate manifest file is an inconsistency waiting to happen. Finally, in the world of graphical user interfaces, the jar program leaves you wishing for more.
The people at The Open Group have created a visual JAR file tool called MoaJar that addresses the drawbacks I just discussed. You can download MoaJar from their web site at http://www.opengroup.org/RI/DMO/moajar/index.html. The Open Group is making MoaJar freely available, so I highly recommend taking a look. The source code even comes with it, and you are permitted to develop a commercial product from it as long as you include their copyright.
MoaJar has a few added features that make it well worth the effort of downloading it from the Web:
Add, remove, extract, or rename a file in the JAR
Edit the name/value attributes in the JAR manifest
Create a serialized object from any class in the JAR or on the CLASSPATH
Edit the properties of a serialized object in the JAR
Figure 6.1 shows what the MoaJar user interface looks like. A list box contains all of the entries in the JAR file. When you select one, the edit area below the list allows you to edit the manifest contents—you can add, delete, or modify attribute/value pairs associated with the entry. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access