J2ME Application Template with Compilation Using Gradle
| buildSrc | ||
| example | ||
| gradle/wrapper | ||
| .gitattributes | ||
| .gitignore | ||
| gradlew | ||
| gradlew.bat | ||
| README.md | ||
| settings.gradle.kts | ||
j2me-gradle
Build
Setup Java
Note
To build the J2ME midlet, OpenJDK 8 is required.
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/