Installing Java Wireless Toolkit On Linux 64 Bit

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Wednesday, March 18, 2009

Installing Java Wireless Toolkit on Linux 64 bit


Apparently Java ME SDK 3.0 is only available for Mac and Windows. So Linux users can install Java Wireless Toolkit, or try Eclipse Mobile Tools for Java SDK. There is a twist when installing Java Wireless Toolkit on 64 bit Linux: J2ME needs a 32 bit Java platform. This post explains how to make the two work together. First download Java JDK for 32 bit Linux from Sun's (now Oracle's) website: J2SE downloads Click on Download button under JDK, accept the license agreement. Don't get the RPM bin file, just the regular tgz file. As of present the name is jdk-7-linux-i586.tar.gz. You can put it wherever you want - I put mine in /java/i586 directory. You might need to log in as root to do that. Or use the root terminal (Applications/Accessories/Root Terminal) on Gnome desktop. Extract the file: tar -xvf jdk-7-linux-i586.tar.gz This should create new directory: /java/i586/jdk1.7.0 You can remove the original archive (jdk-7-linux-i586.tar.gz). Second step is to fix the library dependencies. Log in as root and check if you have apt-file utility installed. If not you can install it with this command: apt-get install apt-file Java Wireless Toolkit depends on the following libraries: ibXpm (libxpm-dev) libXt (libxt-dev) libX11 (libx11-dev) libICE (libice-dev) libSM (libsm-dev) libpthread (libc6-dev) libm (libc6-dev)

libnsl (libc6-dev) libstdc++6-dev

On older Linux systems (Lenny) you might also need to install ia32-libs package. Chances are you won't need to install all of those packages since some are installed automatically as a dependency of another. Install the missing packages like this: apt-get install libxpm-dev apt-file is a useful tool for finding which package contains which file. Use it to find packages containing libXext.so.6. apt-file search libXext.so.6 This file (libXext.so.6) is one of the few that are required by 32 bit JDK libraries. On my box (Linux Debian Lenny 64 bit) running the above command yields the following results: ia32-libs: /emul/ia32-linux/usr/lib/libXext.so.6 ia32-libs: /emul/ia32-linux/usr/lib/libXext.so.6.4.0 libxext6: /usr/lib/libXext.so.6 libxext6: /usr/lib/libXext.so.6.4.0 libxext6-dbg: /usr/lib/debug/usr/lib/libXext.so.6.4.0 If your box already has the ia32-libs package installed, you're OK. If not, install it with this command (still as root user): apt-get install ia32-libs

Now you can install the Wireless Toolkit. Download it from Sun's (now Oracle's) website: Java Wireless Toolkit 2.5.2_01 (I downloaded sun_java_wireless_toolkit-2.5.2_01linuxi486.bin.sh). Make that file executable. Note that you don't need to be root anymore, unless you want to put it in root-owned directory. I installed WTK to /java directory. chmod u+x sun_java_wireless_toolkit-2.5.2_01linuxi486.bin.sh Run the file. It will ask you about the location of the JDK give it the 32 bit JDK location (on my box that's /java/i586/jdk1.7.0/bin). When installation is done you

should see directory WTK2.5.2 inside /java. That's it. Go to /java/WTK2.5.2/bin directory and run ktoolbar program. You should be good to go. Check out the next post for instructions on how to install Eclipse J2ME plugin.

You might also like