Creating an executable JAR
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.
Gradle
The first method, using a Gradle target, can be implemented with the following steps:
- Open up a command window and navigate to your project ...
Get Mastering LibGDX Game Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.