J2ME Application Template with Compilation Using Gradle
Find a file Use this template
2025-08-01 21:12:11 +03:00
buildSrc Initial commit 2025-07-31 22:27:07 +03:00
example Added assets embedding + icon 2025-08-01 21:12:11 +03:00
gradle/wrapper Initial commit 2025-07-31 22:27:07 +03:00
.gitattributes Initial commit 2025-07-31 22:27:07 +03:00
.gitignore Initial commit 2025-07-31 22:27:07 +03:00
gradlew Initial commit 2025-07-31 22:27:07 +03:00
gradlew.bat Initial commit 2025-07-31 22:27:07 +03:00
README.md Initial commit 2025-07-31 22:27:07 +03:00
settings.gradle.kts Initial commit 2025-07-31 22:27:07 +03:00

j2me-gradle

Build

Setup Java

Note

To build the J2ME midlet, OpenJDK 8 is required.

Download Temurin OpenJDK8

Install JDK temporarily using this on Linux or Mac:

export JAVA_HOME="/path/to/extracted/jdk8"

or using this on Windows:

set JAVA_HOME="C:\path\to\extracted\jdk8"

Build & run in emulator

Applying the j2me-app gradle plugin will provide an emulate task. This uses MicroEmulator to emulate the generated JAR file.

Here's how to emulate the example/ project:

./gradlew :example:emulate

On Windows, use it like this:

gradlew.bat :example:emulate

Build only

Here's how to build the example/ project:

./gradlew :example:build

On Windows, use it like this:

gradlew.bat :example:build

After building, the ready-to-install midlet can be found in example/build/libs/