2025-03-14 21:59:59 -06:00
|
|
|
# jar
|
|
|
|
|
|
|
|
|
|
> Java applications/libraries packager.
|
|
|
|
|
> More information: <https://docs.oracle.com/javase/tutorial/deployment/jar/basicsindex.html>.
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
- Recursively archive all files in the current directory into a `.jar` file:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
`jar cf {{file.jar}} *`
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
- Unzip `.jar`/`.war` file to the current directory:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
`jar -xvf {{file.jar}}`
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
- List a `.jar`/`.war` file content:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
`jar tf {{path/to/file.jar}}`
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
- List a `.jar`/`.war` file content with verbose output:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
`jar tvf {{path/to/file.jar}}`
|