Using libgdx with other JVM languages - s76/libgdx GitHub Wiki

LibGDX is mainly a Java-based framework. However, because Java produces Java bytecodes, and the virtual machine runs these bytecodes, it is possible to run LibGDX in any JVM language with proper Java interoperability.

Interoperability

Desktop

This works out of the box, as the desktop LibGDX back-end uses the JVM that you have installed on your computer, which is most likely either OpenJDK or Oracle JDK. Both of these JVMs support polyglot code, as they run on .class files, not Java source code.

Android

This works for many languages, but it is sometimes unavailable. For best results, search on your favorite search engine [JVM language of choice] on Android.

Some examples:

iOS-ROBOVM

The ROBOVM backend is a JVM on iOS which executes Java bytecode. This should work, but has not been tested!

GWT/HTML

GWT transpiles Java to JavaScript. As opposed to Java bytecodes (.class files) to JavaScript code. There are a few reasons, quickly outlined by a Google employee here.

Examples

Many people have used LibGDX in their JVM language of choice. Here are some examples.

TODO (find some recent examples, would love contributions!)

reference

http://www.badlogicgames.com/wordpress/?p=2750

⚠️ **GitHub.com Fallback** ⚠️