A JAR file is a collection of Java class files that contains images, methods, texts, etc into one file. All these class files are compressed and archived to one place to make the file portable. This file can be used by anyone anywhere.
JAR file in Java simplifies distribution and makes it available across multiple operating systems. Users can unjar a JAR files using the jar command that comes with a JDK.
Following are the steps to Unjar a Jar file in Java for Windows:
Points to remember while extracting a jar file:
Use "-C" parameter to extract the JAR files to a different location. Example: jar xf Demo.jar -C "C:\Documents and Settings\June2013\Java".
Following these steps will help you to unjar or extract a jar file to a specified folder. In the same way a user can create a JAR file. JAR files are more convenient as all files are compressed and stored at one place and you just have to execute a single command line to unjar those files. It is better and less hectic than downloading all those uncompressed files separately.
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial