Abhishek Gupta

The Sun won’t set at NIT Durgapur !

Posts Tagged ‘jar’

How to open a .war (web archive) or .jar (java archive) files

Posted by abhiitechie on April 27, 2009

With Java we generate .JAR files to bundle a set of resources. For J2EE web applications, we generate .WAR (Web Archive) files for deployments. Both of these are ways of archiving a set of files.

Both these .jar or .war archives are in zip format. So there are plenty of ways to open those files to read the content. One way would be to use any tool that you use to open/extract a .zip file. Next will be to use the Jar command itself.

JAR Command

JAR (command) utility in Java can be used to open/extract these files as follows. Run following command from the folder where you need the content to be extracted by providing the path to the archive.

jar xf

options:

x – extract the files
f – file to extract

jar xf myWebApp.war
jar xf myProject.jar

Advertisements

Posted in Uncategorized | Tagged: , , , , , , , , , | 1 Comment »