Installing Tools

From Sana

OpenMRS module development using Eclipse[edit]

Development Environment[edit]
  1. Go to
  2. Download “Eclipse IDE for Java Developers (128 MB)”
  3. Copy Eclipse folder into Program Files folder on computer
  4. Launch eclipse.exe
  5. Hit the icon that says “Go to workbench”
SVN plug-in[edit]
  1. Go to Help > Install New Software > Click “Add…” Button
  2. Name:
    Click OK
    Click Next, I agree to terms and conditions, Finish
Java Development Kit (JDK)[edit]
  1. Install Java JDK on computer, version 1.6 or later strongly recommended
    (If only JRE runtime is present, many tasks will not work, make sure you download a JDK) Java 6 downloads
    Follow directions (look online for help)
  2. Make sure you modify environment variables and others they may ask of you
    1. Go to Computer > Right Click > Properties > Advanced System Settings > System Properties > Environment Variables
    2. Under System Variables
      1. Add new variable “JAVA_HOME” with the value as the path to the folder (i.e. “C:\Program Files\java\jdk1.6.0_02”)
  1. Download ant .zip file
  2. Unzip folder somewhere on your computer (i.e. Documents or Program Files folder)
  3. Modify environment variables
    1. Go to Computer > Right Click > Properties > Advanced System Settings > System Properties > Environment Variables
    2. Under System Variables
      1. Add new variable “ANT_HOME” with the value as the path to the zip file (i.e. “C:\Program Files\apache-ant-1.7.1-bin\apache-ant-1.7.1”)
      2. Add to the “PATH” variable, add a semicolon after the last entry “;%ANT_HOME%\bin” and don’t add a semicolon afterwards. Don’t add any extra spaces.


Ant on Windows

Java JDK Downloads

Android Tools[edit]

Android Software Development Kit (SDK)[edit]

There are two options, either install the full Android ADT bundle which includes a version of Eclipse, the Android SDK, and Eclipse ADT Plugin or install the ADT plugin into and existing Eclipse installation and the Android SDK separately. We strongly recommend using the ADT bundle. If you have an existing installation of Eclipse for other development, such as for the OpenMRS module, we strongly recommend installing the ADT Bundle separately and in addition to that environment. Our experience has been that this will help to minimize any issues that may arise from the plugins required for each.

 Android SDK

Full installation instructions for installing as a Bundle or as a plugin are available on that page.

Android Phone Device Debugging with Computer[edit]
  1. On the Phone, turn on “USB Debugging”
    1. Home > Menu > Applications > Development > Enable USB Debugging
  2. Plug Android phone via USB cord into the computer
  3. Click “No not this time” for Windows Auto Installer / Found New Hardware Wizard.
  4. Select “Locate and install drive software” instead of searching online
  5. Select “Browse my computer for driver software”
  6. Point it to the Android folder directory “usb_driver” that you downloaded. Leave “Include subfolder” checked.
  7. If it doesn’t autodetect, you may need to just upgrade the existing driver
    1. Go to Windows Explore, Right Click on Computer > Manage
    2. Select “Device Manager” in the left column
    3. Find “HTC Android Phone USB Device” under “Disk Drives”
    4. Right-Click it and do “Update Driver Software”
    5. Browse computer for the right “usb_driver” folder (see above directions)
Install Barcode Scanner App on Phone[edit]

Moca has been integrated with an Android Barcode scanner application in order to allow healthcare workers to scan barcode patient ID cards to reduce error in typing in their medical numbers.

  1. On phone, go to Android Market (Make sure there is cellular connectivity)
  2. Click Search icon in the top right corner, search for “Zxing”
  3. Select “Barcode Scanner” by the ZXing Team for FREE.
  4. Click Install.
  5. Will show up as downloading on your icon bar on the top of your phone. When it is done, pull down that bar. Click on “Barcode Scanner downloaded.”
  6. It will install on your phone. Then there will be another notification in your menu bar on “barcode scanner successfully installed”. Click on that and read about how to use it.
  7. Hit “Done”


Installing the Android SDK

Installing and Updating the ADT

Adding AVD Devices

Developing on a Device (USB Drivers for Windows, Mac, Linux)