Artikel getaggt mit EclipseME

WTK post install / filesystem permissions

If running your app from the eclipseme emulator shows the following console output

Running with storage root DefaultColorPhone
Warning: Failed to initialize WMA message routing support
Error: Can't remove a lock file: /opt/sun-j2me-bin-2.2/wtklib/comcon-server.port.lock
Warning: Failed to initialize Bluetooth (JSR 82) support
...
Warning: The attempt to finalize unexisting client.
java.lang.NullPointerException
at com.sun.kvem.midp.MIDP.run(Unknown Source)
at com.sun.kvem.environment.EmulatorInvoker.runEmulatorImpl(Unknown Source)
at com.sun.kvem.environment.EmulatorInvoker.runEmulatorSameVM(Unknown Source)
at com.sun.kvem.environment.EmulatorInvoker.runEmulator(Unknown Source)
at com.sun.kvem.environment.ProfileEnvironment$KVMThread.runEmulator(Unknown Source)
at com.sun.kvem.environment.ProfileEnvironment$KVMThread.run(Unknown Source)

give write permission to the wtklib folder inside the WTK:

$ sudo chmod o+w /opt/sun-j2me-bin-2.2/wtklib

The following disease

...
javax.microedition.rms.RecordStoreException: error opening record store file
at javax.microedition.rms.RecordStore.<init>(+428)
at javax.microedition.rms.RecordStore.openRecordStore(+109)
at name.mro.billard.Stats.findPlayers(+6)
at name.mro.billard.Stats.startApp(+4)
at javax.microedition.midlet.MIDletProxy.startApp(+7)
at com.sun.midp.midlet.Scheduler.schedule(+270)
at com.sun.midp.main.Main.runLocalClass(+28)
at com.sun.midp.main.Main.main(+116)
startApp threw an Exception
...

is cured by

$ sudo chmod o+w -R /opt/sun-j2me-bin-2.2/appdb

A Sun Forum Post provided the correct hint.

Tags: , ,

CLDC 1.0 und MIDP 1.0 in EclipseME

da das Nokia 6610 schon ein recht betagtes Mobilfon ist und nur CLDC 1.0 und MIDP 1.0 unterstützt, sollte das im “Eclipse > Window > Preferences > J2ME > Device Management” eingestellt werden.

Ich habe also das “DefaultColorPhone” unter Beibehaltung des Namens (sic!) geklont (duplicate):

J2ME Device Management

J2ME Device Management

und wie folgt eingestellt:

Edit DefaultColorPhone Definition

Edit DefaultColorPhone Definition

Anschließend läßt sich per “Eclipse > File > New > Project > J2ME > Midlet Suite” ein neues Projekt anlegen.

Vorsicht, daß auch wirklich das richtige DefaultColorPhone mit den richtigen CLDC und MIDP jars zugeordnet ist:

Package Explorer Ansicht

Package Explorer Ansicht

Und schon kann’s losgehen!

Evtl. sind die (nicht markierten) anderen jars noch nicht korrekt, aber Rom wurde auch nicht an einem Tag erbaut, oder?

Tags: , , , , ,

J2ME Entwicklungsumgebung + Wireless Toolkit

wie gewohnt auf einem gentoo stable amd64 Linux.

  1. JDK:
    $ sudo emerge dev-java/sun-jdk
  2. Eclipse 3.4 herunterladen und auspacken,
  3. J2ME Wireless Toolkit 2.2:
    $ sudo su -
    $ echo "dev-java/sun-j2me-bin ~amd64" >> /etc/portage/package.keywords
    $ echo "dev-java/sun-j2me-bin examples" >> /etc/portage/package.use
    $ emerge dev-java/sun-j2me-bin
    $ # USE-Flag "j2me" setzen, z.B. via "$ sudo ufed"
    $ sudo emerge proguard
  4. J2ME Wireless Toolkit 2.5.2 heruterladen und installieren,
  5. EclipseMe herunterladen und auspacken.

Tags: , , ,