2016-01-14 12:38:18 +00:00
|
|
|
# jar
|
|
|
|
|
2022-10-11 03:59:50 +01:00
|
|
|
> Java applications/libraries packager.
|
2019-06-05 08:55:22 +01:00
|
|
|
> More information: <https://docs.oracle.com/javase/tutorial/deployment/jar/basicsindex.html>.
|
2016-01-14 12:38:18 +00:00
|
|
|
|
2020-02-04 20:56:35 +00:00
|
|
|
- Recursively archive all files in the current directory into a .jar file:
|
|
|
|
|
|
|
|
`jar cf {{file.jar}} *`
|
|
|
|
|
2016-01-14 12:38:18 +00:00
|
|
|
- Unzip .jar/.war file to the current directory:
|
|
|
|
|
2018-09-06 12:51:52 +01:00
|
|
|
`jar -xvf {{file.jar}}`
|
|
|
|
|
|
|
|
- List a .jar/.war file content:
|
|
|
|
|
|
|
|
`jar tf {{path/to/file.jar}}`
|
|
|
|
|
|
|
|
- List a .jar/.war file content with verbose output:
|
|
|
|
|
|
|
|
`jar tvf {{path/to/file.jar}}`
|