Saturday, June 29, 2013

Eclipse Plug-in Development


To develop Eclipse you need the Eclipse plug in development tools.There are two ways to get these tools.

1)You can download the Eclipse Classic which has the necessary tools.
         
      Download the suitable  Eclipse classic for your OS  from this link.
      And extract it.

2)You can update your existing Eclipse JAVA IDE.
  
      Go to Help=>Install New Software and select the site.In this case it is
      Helios - http://download.eclipse.org/releases/helios
      Then select General Purpose Tools. Under this category you will
      Eclipse plug-in Development Environment. Install it.

    




How to import an exiting Eclipse plug-in project.

Here I am going to import a plug-in  called  PDE template for creating a remote service.Which can be located here. I am entering the data which is suitable for this project.

Go to File=>Import=>General=>Exiting Project.Then Select the directory of the project.Click finish.








After this project is imported it showed some errors.These errors were occured due to some missing packages you can fix them by adding those packages.





You can easily add those packages by moving you mouse to the underlined area and selecting the option "add" from the drop down menu.


After adding those packages all the errors except one.



To fix this we need to edit the MANIFEST.MF file.
http://en.wikipedia.org/wiki/Manifest_file
Problem here is that the required version mentioned in the MANIFEST.MF file can not be found.There for I removed the specific bundle version line.So the plug-in will work with the default bundle version available.



     before editing
 
   after editing 

After editing you have to save the MANIFEST.MF file by pressing ctrl+s.
After this you can see that all the errors have gone.



How to Run a Eclipse Plug-in project

To test a Eclipse plug-in you have to run it as Eclipse Application.To that go to 
Run=>Run Configuration and select Eclipse Application.





To create a new configuration click the icon for creating a new configuration.
Then go the plug-in tab of the new configuration window and and select the plug-in you need to run in this case I am running "remote service" plug-in.






After that click run and you will see that new eclipse will launch will with the plug-in you developed.


















Wednesday, June 26, 2013

Working with GitHub

How to install and configure  GitHub on Ubuntu


Installing  GitHub in ubuntu is very easy.
open terminal and run the following command.
sudo apt-get install git





How to configure GitHub

The first thing you should do when you install Git is to set your user name and e-mail address.To do that enter the following two lines in the terminal.

git config --global user.name "John Doe" # Sets the default name for git to use when you commit

git config --global user.email johndoe@example.com
# Sets the default email for git to use when you commit

to check your setting use the following command.
git config --list


Fork and Clone an Existing Repository

When you need work  on a project page that looks interesting  you can click the “fork” button in the project header to have GitHub copy that project to your user so you can push to it.
To fork a project, visit the project page (in this case,https://github.com/eclipse/ecf) and click
the “fork” button in the header. After a few seconds, you’re taken to your new project page, which indicates that this project is a fork of another one.

After you have fork the project,if you want to get a copy of an existing Git repository the command you need is git clone.

git clone https://github.com/vijayindu/ecf.git
#replace vijayindu with your user name.



this will clone the existing repository to your current working directory of your computer.






Tuesday, June 25, 2013

How to install Maven in Ubuntu

In a terminal(alt+ctrl+t)
type
apt-cache search maven
to get all the available Maven package.







To install maven type
sudo apt-get install maven
in terminal






Type
mvn -version
in your terminal to verify your installation.



You have successfully installed maven.






Install Eclipse,Java and setting variables in Ubuntu

To install Eclipse in Ubuntu first you have to download it from the Eclipse web site.
Here I am installing  Eclipse Juno (4.2)  Eclipse IDE for Java EE Developers Eclipse Juno (4.2)

You can download it from here.


After downloading the file you can you can open it with archive manger and and extract it where you want.

                             

After that you can start using eclipse.

How To Install JDK On Ubuntu

Open terminal by pressing alt+ctrl+t .
Type
apt-cache search openjdk
To search all the available Openjdk version.




Here I am going to install open JDK 7

Type 
sudo apt-get install openjdk-7-jdk
in terminal to install open JDK 7

To verify the installation type
java -version
in terminal



How to set JAVA_HOME for OpenJDK


Type
nano ~/.bashrc
in the terminal to open the .bashrc and edit it.At the end of the file add the following line
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/


                

 

and press ctrl+o and then press enter to save the file.


To verify the java home type
echo $JAVA_HOME

in the terminal