JAR file
A zip archive holding compiled classes and resources, plus a manifest describing them, which the JVM can load directly.
In more detail
JAR stands for Java archive. It is an ordinary zip file with a manifest in its META-INF folder; the JVM loads classes straight out of it without unpacking. Spring Boot builds an executable JAR that contains the application and all its libraries, started with java -jar.
Examples
target/inventory-1.0.0.jarjava -jar app.jarRelated terms
- jar tool — The JDK command that creates, lists and extracts JAR files, like a zip tool that understands manifests.
- JAR manifest — The text file inside a JAR, stored in its META-INF folder, that records metadata such as the main class to run.
- class file — The file javac writes for each class, holding that class's bytecode plus a description of its fields and methods.
- artifact — A file produced by a build, such as a compiled program or an image, that is stored and passed on to later steps.
Taught in
- The Toolchain: Maven — Modern Java: Virtual Threads & High-Throughput Services
- Packaging Into A Container — Modern Java: Virtual Threads & High-Throughput Services
- Tying It All Together — Modern Java: Virtual Threads & High-Throughput Services
- Modules: Exports, Opens And Services — Oracle Certified Professional: Java SE 21 Developer (1Z0-830) Exam Prep
- Jars, Automatic Modules And Runtime Images — Oracle Certified Professional: Java SE 21 Developer (1Z0-830) Exam Prep