How To Set Up Subversion In Eclipse

In the eclipse IDE,

1. Navigate to Help > Install New Software


2. An Install popup appears


3. In the Work with: field click on the drop down and select the url for the version of eclipse you use


4. In the list of items that appear, drop down the collaboration option

5. Select the team collaboration items you need

6. For Subversion, choose the Subversion SVN Team Provider and the Subversion SVN Team Provider Sources. The rest of the subversion packages are optional


7. Click Next

8. On the Install Details Screen Click Next Again


9. On the Review Licenses page, read and accept the licence agreement and click Finish


10. The installation will begin


11. When the installation is complete, you will be prompted to restart eclipse, choose yes.


12. You will need to install an svn connector. When eclipse restarts, an Install Connectors dialog pops up


13. Choose one of the connectors and click finish to install

14. On the Install Popup click Next


15. Click Next Again

16. On the Review Licenses popup read and accept the license agreement and click finish

17. The installation will begin

18. Click OK, if a security warning with this information appears “You are installing software that contains unsigned content. The authenticity or validity of this software cannot be established. Do you want to continue with the installation?

19. When the installation is complete, you will be prompted to restart eclipse, choose yes

You’re good to go.

Happy Coding!!!

How To Create An Application Launcher In Ubuntu

I recently got tired of having to start both IntelliJ and Eclipse from command line so I decided to create launchers for them. Below is the process for creating an application launcher in ubuntu. This example is for Eclipse:

sudo gnome-desktop-item-edit /usr/share/applications/ --create-new

You will get the error below if you do not have gnome-panel installed:

sudo: gnome-desktop-item-edit: command not found

so install gnome-panel with this command.

sudo apt-get install gnome-panel

then run the create-new command as specified.

a popup appears as shown in the image below.


Fill out the fields as follows:

1. Select an image for the icon by clicking on the icon on the square box at the left corner of the popup and browsing to the location of the image

2. Type should be application

3.  Type the name of the application in the Name field.

4. For the Command field browse to the location of the file you usually run from command line to start your application. In this case the



5. Click OK

How to validate an ip address android

Just something I had to figure out today. Thought I might post it, someone might find use for it. I had to validate ip addresses in an android app I am helping build. Below is the method I used for the validation. The same method will work a java application as well.

public static boolean isIpAddress(String ipAddress) {
        String IPADDRESS_PATTERN = "^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
                                   "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
                                   "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
        Pattern pattern = Pattern.compile(IPADDRESS_PATTERN);
        Matcher matcher = pattern.matcher(ipAddress);
        return matcher.matches();

How To Set Up Your Android Environment On Ubuntu

You first need to install the SDK(Software Development Kit) from the android developer page:

You can either download the ADT(Android Development Tools) bundle or just the SDK tools only. The ADT bundle includes a version of the eclipse IDE(Integrated Development Environment) with built-in ADT plug-in. I usually download just the SDK tools(That’s mostly for those who prefer other ides to eclipse)

I recently found out that there is a plugin for developing android in Netbeans but I’m yet to try it. You can also use IntelliJ for android development but I haven’t tried that either.


When the download is completed, extract the download file into a location of your choice. I usually prefer to install all my softwares in my /usr/local/ directory.

cd /usr/local/
sudo tar xzvf ~/Downloads/android-sdk_r20.0.3-linux.tgz

Now download and install eclipse


You can download eclipse from: 

When download is complete extract the download file into a location of your choice

cd /usr/local/
sudo tar xzvf ~/Downloads/eclipse-jee-indigo-SR2-linux-gtk-x86_64.tar.gz
cd eclipse/

Now start eclipse with this command:

sudo ./eclipse

You can now download and install the ADT plugin for eclipse

In the eclipse IDE,

1. Navigate to Help > Install New Software

2. Type this address: into the “Work with” field

3. Click the Add button

4. In the Add Repository popup that shows, choose a name eg. Android Plug-in and Click OK

5. Wait for the plug-ins to load and click the Select All button

6. Click next, On the Install Details form, Click next as well

7. On the Review Licenses screen, read and accept the license agreements and click the Finish button.

If you get a security warning saying that the authenticity or validity of the software can’t be established, click OK.

It will take a few minutes to install

8. When the installation completes, restart Eclipse.

Now You are ready to start developing those amazing Android apps


When the download is complete unzip the file to a location of  your choice. Like I stated previously I prefer to have all my installations to be in my /usr/local directory.

1. Change directory to that directory

 cd /usr/local 

2. Then unzip the file

 sudo unzip /home/eunice/Downloads/ 

This will create a directory with the name of the file you just unzipped.

If you list the files in the new directory(

ls adt-bundle-linux-x86_64-20130729

) you will find two directories(eclipse and sdk).

3. Change directory into the eclipse directory(

 cd adt-bundle-linux-x86_64-20130729/eclipse/ 


4. Launch eclipse from that directory(

sudo ./eclipse


The setup is complete.

Now let’s set up eclipse


Step 1: Eclipse will ask you to set a workspace(directory for saving your projects) as in the image below. Choose a directory and click OK.


Step 2: Contribute usage statistics? Choose yes or no and click finish


Now you are good to go.

The ADT bundle usually comes with just the latest API installed(as at now API 18) so you might want to update your SDK to install the older APIs.

Process for updating Android SDK

1. start the SDK manager in eclipse(In the eclipse IDE, navigate to Window > Android SDK Manager) as shown in the image below.


It will start the SDK manager as shown in the image below. Make sure you have Internet access. The SDK manager will load all the tools and APIs.


select the APIs and tools you want to update and click the “Install packages” button

the packages will be downloaded and installed but this might take a while.

When the installation is complete, restart eclipse(File > Restart) as in the image below.


Now You are ready to start developing those amazing Android apps

Happy Coding!!!

How To Install And Configure Ejabberd On An Ubuntu Server

Recently, a colleague and I were given the task of setting up an xmpp server. After much research, we decided on going with ejabberd. I have a dual boot set up on my HP machine but since I was much more comfortable with Windows 7 at the time(I pretty much love Linux now), I decided to try setting up on windows. Unfortunately, I run into some issues and decided to try setting up on Ubuntu instead(I guess that’s the advantage of having a dual boot set up. You get to have more options).

After writing a wiki on how the installation was done, I decided to use it for my first blog ever.

According to wikipedia:

Ejabberd is an XMPP application server, written mainly in the Erlang programming language. ejabberd stands for Erlang Jabber Daemon (Jabber being a former name for XMPP)


To install ejabberd on ubuntu, erlang has to be installed as well

sudo apt-get install erlang ejabberd


After installation, ejabberd has to be configured.

  1. Run this command to start ejabberd configuration via command line:
    sudo dpkg-reconfigure ejabberd

This opens a different interface for configuring ejabberd.

  • The first step asks for the name of the host ejabberd will serve. If the installation is set up on your local machine then leave it as localhost and press enter
  • The second step asks for the username of an admin account for the host you set up in step 1. This account will be used to login to the ejabberd web interface for admin which is:

    . ejabberdhost should be replaced with the host that was set up in step 1. Enter a username and press enter

  • The third step asks for the password for the admin account set up in step 2. Enter a password and press enter to continue.
  • The fourth step asks for the same password that was entered in step 3. This is for verification. Reenter the password and press enter to continue.
    Now ejabberd is configured and an admin account has been created. You can now login to the admin web interface from your browser with the username and password you chose during configuration.

That’s it. You now have ejabberd set up.

You can start ejabberd with this command:

sudo /etc/init.d/ejabberd start

You can also stop ejabberd with this command:

sudo /etc/init.d/ejabberd start

You can register a user with this command:

sudo ejabberdctl register username host password

Any extra configuration can be done in the configuration file: