Thursday, February 8, 2018

Extracting and creating war files in centos

To manipulate war files, you need a command called jar, and this command is available from openjdk-devel package.


Install openjdk-devel -y
# yum install java-1.8.0-openjdk-devel

You should be able to use jar command
# which jar
/usr/bin/jar

View the content of a war file
# jar tf sample.jar

Extract the content of a war file
# jar xf sample.jar

Create war from files
# jar cf sample.jar /path/to/files

No comments: