jar tool
The JDK command that creates, lists and extracts JAR files, like a zip tool that understands manifests.
In more detail
jar tf lists the entries in an archive, which is how the course shows that a JAR is just META-INF, a manifest, packages and classes. Build tools create JARs for you, so you mostly use it to inspect them.
Example
jar tf target/*.jar | head -5Related terms
- JAR file — A zip archive holding compiled classes and resources, plus a manifest describing them, which the JVM can load directly.
- JAR manifest — The text file inside a JAR, stored in its META-INF folder, that records metadata such as the main class to run.
Taught in
- The Toolchain: Maven — Modern Java: Virtual Threads & High-Throughput Services
- Jars, Automatic Modules And Runtime Images — Oracle Certified Professional: Java SE 21 Developer (1Z0-830) Exam Prep