Skip to content

    Java archive (JAR)

    Reading time: 2 min.Editorially reviewed on:

    Definition

    A JAR file bundles Java classes and other files into an archive for distribution and use.

    JAR stands for Java Archive and uses the ZIP format as a basis. Such an archive can contain compiled classes, resources, and additional metadata. Whether it can be started directly depends on its content and configuration.

    Simply explained

    You pack the required program parts together into a package so they can be distributed together.

    Why it matters in practice

    The format facilitates the provision of Java libraries and applications because related files remain bundled.

    Example from business

    Possible example: A specialized application receives an additional Java library as a JAR file containing classes and required configuration files.

    Limits and pitfalls

    • Not every JAR file is directly executable. An unknown archive should not be started without caution; runtime and dependencies must be compatible.

    Origin & history

    The format belongs to the Java toolchain; the Oracle documentation describes archive management with the jar program.

    Use in mid-sized companies

    • IT teams can provide versioned Java components and document which archives a business application requires for its operation.

    Frequently asked questions

    Is a JAR file always a complete program?

    No. It can also contain only a library or a collection of resources.

    Sources

    Editorially reviewed on:

    On this page

    Next step

    Put knowledge into practice