Q: How do I extract a. war file to a specified directory?
A: The jar command does not have such an option.
Eg: Unzip the Abc.war to the current folder?
A: Enter the target file is the folder where the Abc.war file is located, hold down the SHIFT key and click the right mouse button in the folder, select "Open Command Window (W)", Bring up the command window, type the command: Jar XVF Abc.war, press ENTER to complete the decompression. (After unpacking the folder will be more chaotic, try to put the. war file after the extracted files into the. War under the same name empty folder)
Add:
Usage:jar {ctxui}[vfm0me] [jar-file] [manifest-file] [entry-point] [-c dir] files ...
Options:
-C Create New archive
-t List table of contents for archive
-X extract named (or all) files from archive
-U Update Existing archive
-V generate verbose output on standard output
-F Specify archive file name
-m include manifest information from specified manifest file
-e Specify application entry point for stand-alone application
Bundled into an executable jar file
-0 store only; Use no ZIP compression
-M do not create a manifest file for the entries
-I generate index information for the specified jar files
-C change to the specified directory and include the following file
If Any file was a directory then it is processed recursively.
The manifest file name, the archive file name and the entry point name is
specified in the same order as the ' m ', ' f ' and ' e ' flags.
Example 1:to Archive class files into an archive called Classes.jar:
Jar CVF Classes.jar Foo.class bar.class
Example 2:use an existing manifest file ' mymanifest ' and archive all the
Files in the foo/directory into ' Classes.jar ':
Jar CVFM Classes.jar mymanifest-c foo/.
Extract the war file to the specified directory