Build from source
To build the Godot-JVM GDExtension, install the standard native build dependencies for your platform: SCons, Python, a C++ compiler, and a JDK. You do not need a Godot source checkout to build or test the extension.
Use JDK 17 or newer and set JAVA_HOME to its installation directory.
Check the value with echo $JAVA_HOME in a Unix shell or echo $env:JAVA_HOME in PowerShell.
Note
The Microsoft JDK is known to cause issues when building the IDE plugin on Windows. Use Adoptium Temurin or create the Packages directory in JAVA_HOME, for example C:\Program Files\Microsoft\jdk-21.0.6.7-hotspot\Packages.
Build the native library
-
Clone the repository and its
godot-cppsubmodule:1 2
git clone --recurse-submodules [email protected]:utopia-rise/godot-jvm.git cd godot-jvm -
Build the native library for the editor. This writes it to the harness addon's
libsdirectory by default:1scons platform=linux target=editorReplace
linuxwith your target platform. Usetarget=template_releaseto build the release library used by exported projects. -
Build the Kotlin artifacts:
1 2
cd kt ./gradlew build
The next chapters cover Android builds and running the test harness with these artifacts.