Wednesday, November 11, 2009

Unpack a Java .war file on Mac OX S

Unpacking Java .war file on a Mac is not hard at all. For this demonstration, I'll use the sample.war file that comes with the Tomcat Installation.

Step 1: Fire up the terminal

Step 2: cd to the directory where the .war resides. In this case I moved it from the Tomcat directories to /sample beforehand.

# cd /sample

Step 3: Unpack the .war with the following command:

# jar -xvf sample.war

The contents of the .war are unpacked for you and placed in the same folder as the .war file.

Piece of Cake!!


Anonymous said...

Very helpful, thank you!

Anonymous said...

Thanks it worked for me. Always love it when people share their knowledge freely.