Java archives are referred to as JAR files. These JAR files are the packages that contain the final bytecode generated from compiling the original source. There is a type of JAR file, called an executable JAR, which can be run by simply double clicking on the file as if it were any other Windows executable. The executable JAR contains a manifest file that describes the main entry point of the application, and it usually includes dependent libraries.
There are two primary methods for generating an executable JAR: using a Gradle target or creating an artifact with IntelliJ's IDEA IDE.
The first method, using a Gradle target, can be implemented with the following steps: