Home » Core Java » util » jar


Write JAR file Manifest to file

This is an example of how to write a JAR file Manifest to a file. A JAR file is essentially a zip file that contains an optional META-INF directory. In this directory there is a Manifest, that is used to specify meta-information about the jar file and its entries. Writing a JAR file’s Manifest to a file implies that you ...

Read More »

List entries of JAR file Manifest

In this example we shall show you how to list entries of a JAR file Manifest. The manifest is a special file that contains information about the files packaged in a JAR file. To list the entries of a JAR file Manifest one should perform the following steps: Create a new JarFile to read from the specified file. Get the ...

Read More »

Create Manifest for JAR File

With this example we are going to demonstrate how to create a Manifest for a JAR File. In short, to create a Manifest for a JAR File you should: Create a FileInputStream by opening a connection to an actual file. Create a new Manifest from the specified input stream. Invoke the getMainAttributes() API method of the Manifest to get the ...

Read More »