If this is your first time using libGDX, you’re at the right place. The following steps detail how you can get your first libGDX project up and running.
Before you can get started with libGDX, you need to set up an IDE (Integrated Development Environment). It is basically an editor for your Java files, which makes developing Java applications considerably more convenient in various ways. If you already have an IDE installed, you can skip to the next step.
The Java world offers a lot of different IDEs. All of them will have minor advantages and disadvantages, but in the end they all do their job, so feel free to choose whichever you like most.
(1.) Android Studio
For newcomers wanting to not only target desktop, but mobile platforms as well, we recommend Android Studio.
- JDK: is provided by Android Studio
- IDE itself: Android Studio
- Android: is offered out-of-the-box
- For iOS: RoboVM OSS IntelliJ plugin
(2.) IDEA
- JDK 17 or 21: there are different distributions, but Adoptium should fit your needs
- IDE itself: IntelliJ IDEA (the “Community” edition is sufficient)
- For Android: Android SDK
- For iOS: RoboVM OSS IntelliJ plugin
(3.) Eclipse
- JDK 17 or 21: there are different distributions, but Adoptium should fit your needs
- IDE itself: Eclipse
- Android: not officially supported, but you may have success with Andmore or tinkering around with an older ADT version
- For iOS: RoboVM OSS Eclipse plugin
(4.) Other IDEs
Of course, you can also use any other IDE for Java, e.g. NetBeans or Visual Studio Code. However, as those are not commonly used in the libGDX community, it may prove difficult to get any help if IDE-specific issues arise!
- NetBeans requires the NetBeans Gradle Plugin; Android and iOS are not officially supported
- Visual Studio Code requires extensions to support Java; see the Coding Pack for Java; Android and iOS are not officially supported
- AIDE only supports Android development on devices running Android 10 or older; libGDX’s JAR files can be found here
(5.) No IDE
It is also possible to develop libGDX applications entirely without any IDE, just using a simple editor like Notepad or Vim. This is not recommended, because IDEs provide some very convenient features, such as code completion and error checking. However, if you insist on doing so: libGDX applications are Gradle applications, so they can be built and executed via the command line.
- JDK 17 or 21: there are different distributions, but Adoptium should fit your needs
- For Android: Android SDK
- Set the ANDROID_HOME environment variable, or use gradle.properties
Now that you have a development environment, you can create your very first libGDX project. libGDX offers a setup tool for that, which generates all the necessary files. To get started with it, take a look here.