Creating JAR files - 2
14 April 2008Do read the first part of this. We are talking about creating JAR files.
jar cf myjar input-file(s)
The above command will also generate a compressed JAR file in the current directory. A manifest file for the JAR archive will also be generated.
An interesting information for you is that metadata in the JAR file (entry names, comments, contents of the manifest are encoded in UTF8).
So far we have seen the JAR command in the simplest form. There are few additional options to the cf options of the basic command which are given below:
v - V is for verbose output on stdout. This option can be used if you are interested in seeing the name of each file as it’s added to the JAR file.
0 - Zero is used if you dont want to compress the JAR file.
M - M is used if you do not want the default manifest.
m - m can be used to include manifest information from an existing manifest file (jar cmf existing-manifest jar-file input-file(s))
I hope this was useful.
Related Posts:
Top Of Page | Trackback
If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.
It will look like this: Creating JAR files - 2