Posted by: Marek | March 8, 2009

Setting up WTK on Linux

Sun Java Wireless Toolkit (http://java.sun.com/products/sjwtoolkit/) contains tools (most notably the emulator) and libraries (mostly JSR APIs) that are needed to develop applications based on Java ME. Linux and Windows releases are available. Unfortunately the Linux build is a 32-bit application, so setup on modern hardware is tricky. The following steps are needed to do so:

  • Download and install a 32-bit JDK on your 64-bit Linux. It does not conflict with 64-bit JVMs as long as you use a different installation directory (obviously).
  • Install 32-bit releases of the following X-Window libraries: libXt, libXtst, libXi. Your package manager should allow 32-bit and 64-bit versions to co-exist on your system (at least that is how it works on Fedora that I am using for development).
  • Download and install WTK (I used the 2.5.2 release) and provide a path to the 32-bit JDK when asked about the location of Java runtime.

When it is done you should be able to run the WTK emulator without any problems:

$WTK_HOME/bin/emulator -Xdevice:DefaultColorPhone -Xheapsize:1M -Xdescriptor:$HOME/src/mobile/mobic/trunk/project/target/mobic-0.1-SNAPSHOT-me.jad

WTK emulator

WTK emulator

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: