Abhishek Gupta

The Sun won’t set at NIT Durgapur !

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

One Response to “How to open a .war (web archive) or .jar (java archive) files”

  1. I truly seem to agree with pretty much everything that was composed inside “How to
    open a .war (web archive) or .jar (java archive) files Abhishek Gupta”.
    I am grateful for pretty much all the actual details.

    Thanks for your time,Lowell

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: