/nnproject/

Setting up Eclipse IDE for J2ME on Windows


Preparations

Download Eclipse IDE for java package (not newer than 2024-06!):
eclipse.org or 2024-03 from nnproject.cc

Download MTJ plugin

Download and install JDK 8:
Oracle archive or jdk8u401 x64 from nnproject.cc

Download ProGuard:
SourceForge or 6.2.2 from nnproject.cc

Download KEmulator nnmod

Extract Eclipse, ProGuard and KEmulator.
Launch Eclipse IDE.

IDE Setup

Install MTJ plugin:
Open Help>Install New Software...>Add...>Archive...; locate mtj.zip, click Add.
Agree with every prompt, wait until it asks to restart.

Open Window>Preferences.
Go to Java>Installed JREs, add JDK 8:
Add...>Standard VM, fill in "JRE home" field with path to where you installed JDK 8, click Finish.
Make it default.

Go to Java ME category, locate path to extracted proguard in field "Proguard Root Directory".
Open Device Management, click Manual Install..
Locate extracted kemnnmod, click Refresh.
When KEmulator nnmod option appears, click Finish.
Make new configuration as default.

Go to Java ME>Packaging>Obfuscation, check "Use specified arguments".
Enter following: -dontusemixedcaseclassnames -dontnote -defaultpackage '' -dontoptimize

Development

Change perspective: Window>Perspective>Open Perspective>Other...>Java ME
Right click in Package Explorer, New>Java ME Project, name your project, click Finish.
Right click at src folder, New>Java ME MIDlet, name your main MIDlet class, click Finish.
Code.

Building

Open Application Descriptor, click Create Package, check Use deployment category, and Obfuscate the code if needed.

Check compiled result

Open output jar package as archive (it will appear in project/deployed/KEmulator), make sure everything is on place.
* if resources are missing, go to Application Descriptor, Build tab, check every item.
* if there is no classes, most likely that preverifier failed to complete. Error Logs or .log file might help.

Launching in emulator

In Application Descriptor, click Launch as emulated Java ME or JAD.
* if JAD does not work, then project was probably renamed. Edit .mtj file in project folder, by setting current name in second line.

Adding more emulators

Repeat Device Management step in IDE Setup,
Then in Application Descriptor add new configuration under Runtime title.
2025, nnproject

Site made by rehdzi & shinovon