A lightweight starter template for creating Java ME (J2ME) applications using MIDlet. Designed to help you quickly set up new projects for the Java ME platform (CLDC + MIDP).
repo/
├── img/
│ └── example.png
├── mk/
│ ├── actions.mk
│ ├── paths.mk
│ └── rules.mk
├── src/
│ └── Main.java
├── .env.sample
├── .gitignore
├── LICENSE
├── Makefile
├── README.md
└── icon.png| Tool | Version | Purpose | Local file name |
|---|---|---|---|
| Make | 3.81 (Windows) | Automate build commands (make build, make run, etc.) |
(installed manually) |
| Zulu JDK 8 | 1.8 | Compile .java |
zulu8.86.0.25-ca-jdk8.0.452-win_x64.msi |
| Java ME SDK 3.4 | 3.4 | CLDC/MIDP libraries | oracle-jmesdk-3-4-rr-win32-bin.msi |
| JRE 6 | 1.6 | Emulator runtime | jre-6u37-windows-i586.exe |
| Nokia SDK | Series 40 6th Edition | Optional, to run apps | S40_6th_Edition_SDK.exe |
git clone https://github.com/LastSurvivalOn/j2me-template.git
cd j2me-templatecp .env.sample .envThen edit .env with your absolute paths.
Example:
JDK=D:/Nokia/ZuluJDK8
SDK=D:/Nokia/J2ME_3.4_SDK/Java_ME_platform_SDK_3.4
JAVA_HOME=D:/Nokia/jre6
NOKIA_SDK=D:/Nokia/S40_6th_Edition_SDK
APP_FILE_NAME=launch
MIDLET_NAME=APP
MIDLET_VENDOR=Author
MIDLET_VERSION=1.0
MIDLET_CLASS=Main
MIDLET_PROFILE=MIDP-2.1
MIDLET_CONFIG=CLDC-1.1
MIDLET_ICON=icon.png
MIDLET_PERMISSIONS=javax.microedition.io.Connector.file.read, javax.microedition.io.Connector.file.write
SRC_DIR=src
BIN_DIR=bin
DIST_DIR=dist
RES_DIR=res
MANIFEST_FILE=manifest.mf
MANIFEST_FILE_VERSION=1.0| Command | Description |
|---|---|
make help |
Show available commands |
make build |
Compile .java, package .jar, generate .jad |
make clean |
Remove build artifacts (bin/, dist/) |
make run |
Launch in Nokia Series 40 Emulator |
make all |
clean ➔ build ➔ run (full cycle) |
Below is a screenshot of a successful make run (or make all) execution:
This project has been tested both on an emulator and a real device:
- Emulator: Nokia S40 6th Edition SDK Emulator
- Real Device: Nokia 112
The MIDlet successfully launches, displays the intended screen, and operates as expected on the real hardware.
-
Compile:
Java source (src/) → Compiled.classfiles (bin/). -
Manifest:
Auto-generatedmanifest.mfbased on.envconfiguration. -
Package:
.class+ resources zipped into.jar(dist/). -
Descriptor:
.jadfile is created — needed for emulator/device installation. -
Run:
Emulator starts and installs your app.
Simple MIDlet example (Main.java):
TextBox helloScreen = new TextBox("Hello", "Hello, Nokia 112!", 256, 0);
display.setCurrent(helloScreen);.env
.vscode/
bin/
dist/
manifest.mf
- Format: PNG
- Size: Recommended 32×32 pixels
- Path: Should be at project root (
icon.png) unless changed in.env.
-
Can I rename
manifest.mf?
➔ Yes, configureMANIFEST_FILEin.env. -
Supported platforms?
➔ Windows -
Cross-compilation?
➔ Yes, you can build.jaron PC and transfer via Bluetooth to a real device.
- Linux optimized Makefiles
- Docker-based builds for CI
make all✔ Your MIDlet is ready inside dist/ 🚀
This project is licensed under the MIT License.
Made with ❤️ by LastSurvivalOn
