A JAR file is an archiving format that not only stores directories and source files and can also be run as executable files. Such Java ARchive files can contain Java class files that will run when the JAR is executed.