I want to clarify whether the Java Framework "LibGDX" can be used to compile games to native executables. The description/tagline says "Desktop/Android/HTML5/iOS Java game development framework".

I presumed that when they say "desktop", what is meant is native executables and not that they'll be .jar that needs JVM/Java installed on the native machine to run.

Can Libgdx games run without a Java dependency?


It means desktop.

You have two options to deploy your libGDX app to the desktop:

  • Create a self-runnable JAR. This is easier (Eclipse can export it pretty easily).
  • Create an EXE, via launch4j (or some other wrapper). This is possible too (especially with Gradle).

I've used both approaches and they work equally well as far as I can tell.

Both rely on Java being installed. You still need a JVM; there's no way around it.

Launch4j also includes an option to bundle a JRE with your app, which would make it a "true" standalone application (doesn't need Java installed on the user's PC). Your app will be quite big, though.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.