Unpack a war file to a destination folder

26,847

Jar file is zip file. You can extract it with zip.

Share:
26,847

Related videos on Youtube

Brady Zhu
Author by

Brady Zhu

JAVA EE Developer

Updated on September 18, 2022

Comments

  • Brady Zhu
    Brady Zhu 5 days

    I know how to simply unzip a zip file to destination folder, just type the following command line in terminal:

    unzip file.zip -d /folder/destination
    

    Obviously -d option points out the destination folder, but I doesn't work for jar command line. Command line 'jar -vxf file.war' will extract file.war to the current folder, but command line 'jar -vxf file.war -d /folder/destination' does nothing, which means there is nothing generated under folder destination.

    Is it possible to set the destination folder for jar command line.

  • Brady Zhu
    Brady Zhu about 9 years
    I tried and it solved my problem. Thanks for inspiring me.