There are two ways of installing eclipse IDE in ubuntu.
1.Using Ubuntu Software Center Or
2.Download Eclipse IDE package and then install manually
1.If you use Ubuntu Software Center for installing eclipse,new version of eclipse is not available.
The above version is 3.7.2-1.However newer version 4.2 juno is available here.
NOTE:Before installing eclipse IDE you need to check few things.
First, whether you have Java installed or not.For that you need to run following command in your terminal...
# java -version
If you get the following output that means Java is not installed on your Ubuntu12.04.You need to install Sun JDK or Open JDK using Ubuntu Software Center.
And if you get the following output that means you have java installed in your OS.
Second, if you are installing Eclipse IDE for C/C++,you need to check whether g++ is installed or not.
To check whether g++ is installed or not you need to run the following command in the terminal...
# g++ --version
If you get the following output that means g++ is already installed else you need to install it using Ubuntu Software Center.
2.By manually downloading the eclipse IDE package.
a.First download the eclipse tar.gz package from here.
b.Then righ-click the eclipse tar.gz and choose the extract here option to extract the tar.gz package.You can also use the command line to extract the tar.gz package.
# tar xzf eclipse-cpp-juno-linux-gtk.tar.gz
c.Move the extracted eclipse in the /opt/ folder.Before running the below commmand be sure that you are in the directory which contains extracted eclipse folder.
# mv eclipse /opt/
Use sudo if the above command gives permission denied message.
# sudo mv eclipse /opt/
d.Create a desktop file and place it into /usr/share/applications
# sudo gedit /usr/share/applications/eclipse.desktop
and copy the following to the eclipse.desktop file
[Desktop Entry] Name=Eclipse Type=Application Exec=/opt/eclipse/eclipse Terminal=false Icon=/opt/eclipse/icon.xpm Comment=Integrated Development Environment NoDisplay=false Categories=Development;IDE Name[en]=eclipse.desktop
e. Create a symlink in /usr/local/bin using
# cd /usr/local/bin # sudo ln -s /opt/eclipse/eclipse
f. Now its the time to launch eclipse.
# /opt/eclipse/eclipse -clean &
g.If your eclipse does not start after 2.f then you need to check for few things.
i) whether in the /opt/eclipse directory you have the eclipse executable file or not.If you don't have the eclipse executable file inside it.Please check for the location of eclipse executable file and do the following changes according to your_eclipse_executable location.
In step 2.d
Exec=/opt/eclipse/your_eclipse_executable_location
# sudo ln -s /opt/eclipse/your_eclipse_executable_location
means:
your_eclipse_executable_location=Path of your eclipse executable where it is residing.
For example: In my case,I directly have eclipse executable file inside my /opt/eclipse folder so my command in step 2.d is
Exec=/opt/eclipse/eclipse
# sudo ln -s /opt/eclipse/eclipse
ii)If you already have eclipse file present inside the /opt/eclipse folder and you are unable to run that file then use chmod command to change the mode of that file to executable.
# sudo chmod +x /opt/eclipse/eclipse or
If you have eclipse executable somewhere else ,you use the following command # sudo chmod +x /opt/eclipse/your_eclipse_executable_path
where your_eclipse_executable_path=Path of your eclipse executable
Source: http://akovid.blogspot.com/2012/08/installing-eclipse-juno-42-in-ubuntu.html
No comments:
Post a Comment