This section shows you how you can read the content of jar file from your java program and list the content. This section helps you to view the contents of the jar file without extracting it. You can easily understand about the jar file operation through the given example.
This program takes takes a jar file name which has to be viewed. It shows the contents of the given jar file without extracting. It also shows the jar file content, a default manifest file, META-INF/MANIFEST.MF. The default manifest file is automatically placed in the archive in the creation of the jar file.
This is the interface helps to generate a series of elements. You can check for the availability of the next element by using the hasMoreElements() method. The nextElement() method of the interface returns the next element of the series of the elements.
Here is the code of the program:
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial