sajad torkamani

In a nutshell

A JAR (Java ARchive) is a package file formated used to combine many Java class files, metadata, and resources (e.g., images, property files, etc) into a single compress file that can be easily distributed. It’s essentially a ZIP file.

Key features:

Executable vs Library JARs

An executable JAR has a Main-Class entry in its manifest, allowing it to be run directly from the terminal using a command like;

java -jar myjar.jar

A Library JAR contains Java libraries (classes and resources) that are intended to be included as dependencies in other Java applications, instead of being ran directly as with executable JARs.