Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am starting mobile apps development using java. I have successfully set up netbeans IDE. I want to be able to use the Sun Wireless Toolkit (WTK 2.5.2) emulator to test my applications. However, when I test run my apps, the emulator isn't started.

A thorough search on the internet indicated that the WTK I am using is targeted for JRE 32 while the one I have in my system is the 64 bit version. The only remedy suggested was to install the jdk 32 bit version and point WTK to that version.

How do I install the 32 bit version of jdk while at the same time keeping the 64 bit one?

Below are my specs:

1. Intel Core i3
2. Ubuntu 11.10 desktop operation system.
3. my jdk installation path (64 bit version) /usr/lib/jvm/java-6-openjdk
share|improve this question
add comment

2 Answers

Download whatever version you need from oracle web-page and install it.

http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u32-downloads-1594644.html

use *.bin file.

share|improve this answer
    
Please include more information on what to do with the .bin file. Execute it? In terminal? Run it through an archiver? Other users may not see enough info in this answer. –  hexafraction Aug 13 '12 at 12:18
add comment
up vote 3 down vote accepted

It turns out that, all I need to do is download the self extracting 32 bit jdk version package for ubuntu and install it in any location of choice which should be different from the one current 64 bit version is sitting (In my case I put it in /opt/jvm/). Below is a step by step explanation of what I did to make it work.

  1. Download relevant 32 bit version of jdk (I used java jdk-6u32-linux-i586.bin) found here

  2. make it executable by running the following command

    chmod +x jdk-6u32-linux-i586.bin
    
  3. extract this file by simply executing it (Remember it is self extracting). That is run the following command on terminal. (Make sure you are in the directory in which the file is stored).

    ./jdk-6u32-linux-i586.bin 
    

    Note: the contents will be extracted into directory(its name will be jdk1.6.0_32 in this case) which will be created in the current directory.

  4. Copy the directory created in step 3 above into whatever location you want to install the jdk (in my case /opt/jvm). Note that you have to create jvm in opt if it is not yet created. See commands to use below.

    sudo mkdir /opt/jvm
    sudo cp -r jdk1.6.0_32
    
  5. Edit /path-to-where-netbeans-is-installed/netbeans7.1/mobility/WTK2.5.2/bin/emulator and change the variable javapathtowtk to point to newly installed jdk bin directory (that is in my case it is as shown below).

     nano /home/willa/netbeans7.1/mobility/WTK2.5.2/bin/emulator
    
     #!/bin/sh
     javapathtowtk=/opt/jvm/jdk1.6.0_32/bin/
    

Save and exit. And voila enjoy you can now run your applications using WTK2.5.2 emulator.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.