sabato 28 agosto 2010

J2ME on Debian GNU/Linux (squeeze/amd64)

I spent the last 4 hour to get NetBeans "J2ME ready" on my AMD 64 machine.
In the process I apt-get installed:

  1. openjdk-6-jdk (may be I'll remove soon)

  2. ia32-sun-java6-bin

  3. sun-java6-jdk

  4. ia32-libs-gtk



Then I downloaded the netbeans installation script from netbeans.org, and I run it as root to get netbeans installed in /opt/netbeans.

I downloaded the Sun Java Wirless Toolkit v2.5.2 (since the 3.0 does not run on linux).

I run the script, installing in /opt/j2me.

Unfortunately the 2.5.2 is targetted to IA32 (aka i386 machines), and I'm the proud owner of a AMD 64 Debian.
This is why I had to install ia32-sun-java6-bin and ia32-libs-gtk.

To get the mobile emulator up and running I had cd /opt/j2me/bin and edit the script listed by file /opt/j2me/bin/*|grep "POSIX shell":

  1. /opt/j2me/bin/defaultdevice

  2. /opt/j2me/bin/emulator

  3. /opt/j2me/bin/i18ntool

  4. /opt/j2me/bin/ktoolbar

  5. /opt/j2me/bin/mekeytool

  6. /opt/j2me/bin/prefs

  7. /opt/j2me/bin/siptool

  8. /opt/j2me/bin/utils

  9. /opt/j2me/bin/wscompile



In each I replaced javapathtowtk=/usr/lib/jvm/java-1.6.0-openjdk/bin/ with /usr/lib/jvm/ia32-java-6-sun/bin/.

In emulator I had to add also export GTK_PATH="/usr/lib32/gtk-2.0" and export GTK_MODULES="" just after that.

Than I started to develop J2ME applications.

Well... No I'll go to sleep.

Nessun commento:

Posta un commento