How to Set Up RTC for Android Development on Windows

Android and the RTC rich client both operate within Eclipse. This gives us a great platform for seamlessly developing Android-based software, managing projects, controlling assets, and performing continuous builds. Android and RTC play well together, but there are a few extra setup steps required to introduce them to each other. This post describes those steps.

Download Software
Android likes the JDK from the Java organization. When you select the version of the JDK to download, use the 32-bit version for for Windows.
Download the RTC client from jazz.net. This installation procedure was tested using the Standard version so I recommend using that one. Download the version that uses the Installation Manager (IM), as provided in the link.
The Android SDK must be available to RTC to do Android development.

Installation

Install JDK 1.6
Install JDK 1.6 per the instructions for that software.

Install the Android SDK
Unzip the SDK directory and place it wherever you want.

Install RTC 2.0.0.2
Unzip the RTC installation download and start launchpad.exe in the RTC directory. Select the option to Launch IBM Installation Manager to Update Existing Product Components even though you’re installing from scratch.
IM will be installed if necessary. Restart IM when asked to do so.
RTC must be installed using at least version 1.3.3 of Installation Manager (IM) to make sure we’re getting all the plug-ins we need. The version of IM (as of this writing) that ships with 2.0.0.2 is earlier than that, and the most recent version is 1.4. So first thing we do in IM is tell it to upgrade itself.
  • Select File>Preferences>Update>Search for Installation Manager Updates, then select OK.
  • Select Update on the main IM screen.
  • Update IM when prompted.
  • Restart IM when prompted.
  • Add the RTC installation repository to IM by selecting File>Preferences>Repositories>Add Repository.
  • Navigate to the directory where the RTC installation files are, go into the im-repo directory, and selectrepository.config. Select OK to all the dialogs until you’re back to the main window in IM.
  • Select Install.
  • Select Rational Team Concert – Client for Eclipse IDE Version 2.0.0.2 iFix3 and select Next.
  • Accept the terms of the license agreement and select Next.
  • Select Create a new package group and enter the installation directory (the default will usually be fine). Select Next.
  • Do not extend the existing Eclipse installation. Select Next.
  • Select your languages, then select Next.
  • If you want to use Sametime with RTC, select Sametime Integration Update Site. If you’re not sure, leave it blank. Select Next.
  • Select Install.
After RTC is installed you can close IM and Launchpad.

Change the JRE
  • Launch the RTC Eclipse Client.
  • Select Windows>Preferences>Java>Installed JREs.
  • Select Add.
  • Select Standard VM, then Next.
  • Select Directory… and navigate to the root directory where you installed JDK 1.6, for example c:\program files\java\jdk1.6.1_21.
  • Select Finish.
  • Select the checkmark next to the location you just created, then select OK.

Install the Android Developer Tools Plugin
Add the ADT installation site to the list of Eclipse install sites and install the plugins.
  • Select Help>Software Updates>Available Software
  • Select Add Site…
  • Enter the location https://dl-ssl.google.com/android/eclipse (use http: if https: doesn’t work).
  • Select everything under the site you just entered, then select Install.
  • Restart RTC when prompted.
If you get a message that you are unable to install the ADT plugin because of dependencies that are not present, do the following:
  • Add http://download.eclipse.org/eclipse/updates/3.4 as an update site in Available Software.
  • Select everything under Eclipse SDK.
  • Select Install, and restart RTC when prompted.
  • Repeat the procedure described above to install the ADT plugin.
This issue has been seen when installing ADT in RTC under 64-bit Windows 7.

Add the location of the Android SDK
  • Select Window>Preferences>Android>Browse.
  • Navigate to where you placed the Android SDK directory.
  • Select OK.
  • Select the AVD Manager (toolbar or menu option) and load the Android platforms you want.
  • Exit RTC.

Edit eclipse.ini

Edit RTC’s version of eclipse.ini
to use the Android compatible JVM.
Go to the RTC installation directory and open the eclipse.ini file in a text editor. Edit the line that specifies the virtual machine so it points to the directory that holds the JVM for JDK 1.6. This is the line after the -vm command. The lines in the eclipse.ini file should look something like this:
-vm
C:\Program Files\Java\jdk1.6.0_21\bin
Remove IBM JVM arguments from eclipse.ini by deleting lines that have xjit:exclude…in them.

Edit RTC Command Line Options
There are a few useful (and necessary) command line options that should be set when you launch RTC for Android development. The easiest way to do this is to create a Windows shortcut and add the options to the command line of the Target field.
It’s usually desirable, though not required, to specify our own Eclipse workspace. You can have any number of workspaces. Each maintains information such as window positions, current projects, etc. If you don’t specify a workspace you’ll always work in the default workspace. Keep things clean by managing your own workspaces instead.
Specify a workspace directory by using the -data option on the command line. The following example of a command line would launch Eclipse (or RTC) and use the myworkspace directory as the workspace instead of the default workspace:
c:\eclipse\eclipse.exe -data “c:\My Workspaces\myworkspace”

Android and RTC together require more memory than the Eclipse allocates by default
. Eclipse defaults to 256MB so double it to 512MB. Also, increase the size of permanent generation memory. The default is 64MB, so make it 128MB. Use the vmargs parameter to increase memory (see below). Vmargs must be the last parameter on the command line.
The full command line of your shortcut should look something like this:
“c:\program files\ibm\team concert\eclipse.exe” -data “c:\my workspaces\android project” -product com.ibm.team.concert.product -vmargs -Xmx512M -XX:MaxPermSize=128M
Launch RTC using the shortcut. You’re now ready to develop Android applications within RTC.

Final Note

An alternative to this approach is to to install Eclipse 3.4 and the ADT, then install RTC 2.0.0.2  into that Eclipse environment. If you choose this approach, be sure to install the required patches into Eclipse before installing RTC. You won’t need to edit eclipse.ini if you take this route, but you will need to perform the other steps in this blog entry such as increasing memory via the command line.

Troubleshooting
If you create and run an Android application and you get the message Unable to find [filename].adk, you have probably not identified the correct JDK and JRE. Go to Window>Preferences>Java>Installed JREs and add the path to JDK 1.6 (see the section Install RTC 2.0.0.2 for instructions).
If you get errors that indicate dependent plug-ins are not present when installing the ADT plugin, you have probably performed the steps out of order. In particular, you may have edited the eclipse.ini file before installing the ADT plugin. Revert to the original config.ini, start RTC, install the ADT plugin, then revert back to the modified config.ini.

References

This article applies to: RTC 2.0.0.2 Standard Client ifix 3, Eclipse 3.4, Android Development Toolkit (ADT) 0.9.7Windows XP SP3, Windows 7 (64-bit). The installation steps were tested under Windows XP SP3 and Windows 7 (64-bit). Linux hasn’t been verified at this time, but the steps should be similar.

Advertisements
This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

8 Responses to How to Set Up RTC for Android Development on Windows

  1. Pingback: How to Set Up RTC for Android Development on the Macintosh | JazzPractices

  2. Elvis Dowson says:

    Is there a technote that describes how to integration Rhapsody-7.5.2 to perform Android App development integrated with Rational Team Concert, as demonstrated in the following video:

    I’ve tried out the Rhapsody Android Stopwatch demo and it works well, but I did that without using an SCM back-end. I’ve used Rhapsody with Telelogic Synergy/Change, and I’ve also worked with ClearCase/ClearQuest before. I’ve not explored RTC much. I did however manage to setup RTC-2.0.0.2 iFix 2 once on Mac OS X 10.6.4, but because the whole things is so different from what I’ve been used to, plus a lack of time to explore RTC, I haven’t been able to figure out where to start.

    It would be great if I could get some pointers on

    a. Taking an existing baseline Rhapsody source, importing it into RTC, and connecting Rhapsody with RTC.

    b. Configure a simple RTC project to recreate the Rhapsody Android App example.

    c. Configure the project so that RTC can integrate with git, so allow me to export changes to a git repository, as well as import changes from a remote git repository.

    • jruehlin says:

      Regarding the RTC/Rhapsody integration, RTC 2.x uses Eclipse 3.4 while Rhapsody 7.5.x uses Eclipse 3.5. I haven’t tested this myself, but I don’t think shell sharing is possible between the two.

      However, RTC 3.x (due within a couple of weeks) uses Eclipse 3.5 so it’s about time to play with integrating the two. I’m moving these items up my list of future blog posts so keep an eye out. I also have the RTC-Git integration on my list for Android developers. In the meantime, see this article on jazz.net for some info on RTC-Git integration.

      – Jim

  3. Pingback: 2010 in review | JazzPractices

  4. Kevin says:

    I always prefer to start with Eclipse and build from there. You can use the latest Eclipse, Helios 3.6.1, with RTC 2.0.0.2 iFix5. Install Eclipse as usual, but when downloading RTC, be sure to grab the p2 repository version. Set it up as an update site, install, and you’re good to go.

  5. Kim Søderhamn says:

    In case you run into something like
    HelloAndroid] Could not find HelloAndroid.apk!

    running windows 7 64 bit – the issue can be in the area of RTC not being started with your standard java instead of the ibm one.

    I had problems changing the eclipse.ini file because after I did this my RTC (I use RTC 3.0) would not start – it turns out that while I used the java from C:\Program Files\Java\jdk1.6.0_18\jre\bin I should have been using the ones from the x86 folder
    So I used these values in the eclipse.ini (which also triggers the use of the same jre inside rtc)
    -vm
    C:\Program Files (x86)\Java\jre6\bin\java.exe

    This made it possible to start RTC and made my error disappear.

  6. Poet says:

    yur blog is one really gracious one. As a result of for partitioning such great information out. Ill deff be cruising by more frequently so i an observe whats great!

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