[Home]How To Make A Java Jar File

Contents | (Visit Preferences to set your user name.) | Related To How To Make A Java Jar File | RecentChanges | Preferences | Index | Login | Logout

Featured: Featured Stories | Picture Gallery

13 Year Cicada | Hedy Lamarr
Google
Chat11.com Web Bible11.com MyBibleCenter.com
Cover of ISBN 0672323079

Cover of ISBN 0761535225

Java Programming For The Absolute Beginner

Cover of ISBN 0596003471

Programming .NET Components

How To Make A Java Jar File

Subjects > ... > Java Programming

Compress Files To A Java Archive (JAR)
This is by far the most common use for JAR files: to compress multiple files into a single JAR archive. JAR files can be opened with WinZip or WinRar?Create. In terms of Java applications, the ability to archive any number of source or class files into one single archive represents the biggest advantage - distributing one file containing hundreds of files is so much easier than distributing hundreds of files separately!

The jar utility program is run from the command line (DOS prompt or bash for example, depending on your OS). Here is how to create a compressed JAR file:

   jar cf archive_name.jar files
Let's look at each part of that command line.

jar The command to run the jar utility.

CF Create a new archive with the file name specified. These two options are from this list of common options:

- c create new archive - t list table of contents for archive - x extract named (or all) files from archive - u update existing archive - v generate verbose output on standard output - f specify archive file name - m include manifest information from specified manifest file - 0 store only; use no ZIP compression - M do not create a manifest file for the entries - i generate index information for the specified jar files - C change to the specified directory and include the following file

Multiple options can be used together. They all must appear after the "jar" command with no white space separating them.

archive_name.jar Name of the JAR file. This can only be included if you use the 'f' option.

files Names of all the files you want to put in the jar file. This could be just one name or a list of multiple names separated by space. Names can use pattern matching characters to match multiple files [hospedagem].

Related

Search for books about:

Garnet, Java Programming, WinRar, WinZip

Search The Net:
Garnet
Java Programming
WinZip
WinRar

Contents | (Visit Preferences to set your user name.) | Related To How To Make A Java Jar File | RecentChanges | Preferences | Index | Login | Logout
Edit this bookstore.mybiblecenter.com page | View other versions
Last edited April 8, 2007 2:54 am (diff)
Search:
Sign up for PayPal and start accepting credit card payments
instantly.
Bobsgear - Get A Free Enterrpise Wiki Space!
Review: The Bobsgear Project was started to develop a variety of Confluence plugins. This installation of the Confluence Enterprise wiki includes flexible attachments, many Confluence plugins, personal blogs, interesting articles, and more. Bobsgear already has spaces related to politics, art and photography wiki, technical issues wiki, ediscovery wiki, health, Christian theology and Sabbath School wiki, the bible, book reviews, and quotations. Bobsgear allows free signup, and invites anyone to create a free hosted Confluence wiki space.


NEW USERS CLICK HERE! for a quick introduction to Wiki.

 

 Interested in Kay Francis?
8760 total hits since 8/2007
Recently accessed pages: About Rita Divorce Does Four Inches Of Ocean Rise Attributed To Global Warming Make A Difference Eugenics Eugenics And Diseases Peculiar To Women Garnet's Interesting Articles Google Patents How To Give A Successful Presentation How To Hit Longer Drives In Golf How To Keep A Time Log Advice For Entrepreneurs How To Keep Brown Sugar How To Keep Celery Fresh How To Make A Glossy Pie Crust Impossible Pie Recipes Infidelity Larry Hiibel Required To Provide Name To Cops Libya List Of Phobias That Start With D List Of Phobias That Start With S Record Review Doctrine RecoveryAndSupportPage Spam Tricks - Spam Prevention Ideas TrafficSwarm Vietnam War Where's That Share

Elapsed:0