Install Eclipse SDK 3.7.1 (Indigo) on Fedora 16/15, CentOS/RHEL 6.2/5.7
This is guide, howto install latest Eclipse SDK 3.7.1 (Indigo) on Fedora, CentOS and Red Hat (RHEL). This guide should work with Fedora 16, Fedora 15, Fedora 14, Fedora 13, Fedora 12, CentOS 6.2/6.1/6/5.7 and Red Hat (RHEL) 6.2/6.1/6/5.7 and even with earlier versions.
Eclipse is a multi-language software development environment comprising an integrated development environment (IDE) and an extensible plug-in system. It is written primarily in Java and can be used to develop applications in Java and, by means of various plug-ins, other languages including C, C++, COBOL, Python, Perl, PHP, Scala and Ruby (including Ruby on Rails framework).
Install Eclipse SDK 3.7.1 (Indigo) on Fedora, CentOS, Red Hat (RHEL)
1. Install Sun/Oracle Java JDK 7 or Java JDK 6
Install Sun/Oracle Java JDK 7 on Fedora, CentOS, Red Hat (RHEL)
Install Sun/Oracle Java JDK 6 on Fedora, CentOS, Red Hat (RHEL)
2. Download Eclipse SDK 3.7.1 (Indigo)
Download suitable version from www.eclipse.org/downloads. This guide uses Eclipse Classic 3.7.1 version. Another popular versions are Eclipse IDE for Java EE Developers, Eclipse IDE for Java Developers and Eclipse for PHP Developers. Select also 32-bit or 64-bit version depending on your system.
3. Change root user
su - ## OR ## sudo -i
4. Extract Eclipse package (example to /opt directory)
## x86 - 32-bit ## tar -xvzf eclipse-SDK-3.7.1-linux-gtk.tar.gz -C /opt ## x86_64 - 64-bit ## tar -xvzf eclipse-SDK-3.7.1-linux-gtk-x86_64.tar.gz -C /opt
5. Add read permissions to all files
chmod -R +r /opt/eclipse
6. Create Eclipse executable on /usr/bin path
touch /usr/bin/eclipse chmod 755 /usr/bin/eclipse ## Open eclipse file with your favourite editor ## nano -w /usr/bin/eclipse ## Paste following content to file ## #!/bin/sh export ECLIPSE_HOME="/opt/eclipse" $ECLIPSE_HOME/eclipse $*
7. Create Gnome desktop launcher
## Create following file, with our favourite editor ## /usr/share/applications/eclipse.desktop ## Add following content to file and save ## [Desktop Entry] Encoding=UTF-8 Name=Eclipse Comment=Eclipse SDK 3.7.1 Exec=eclipse Icon=/opt/eclipse/icon.xpm Terminal=false Type=Application Categories=GNOME;Application;Development; StartupNotify=true
8. Start Eclipse 3.7.1
From command line use eclipse command
eclipse
From Desktop menu Gnome 3 Eclipse 3.7.1

From Desktop menu Gnome 2 and Eclipse 3.6 (Helios)

9. Eclipse 3.6 screenshots, running (and starting) on Fedora 13 32-bit and CentOS 5.5 64-bit
Eclipse 3.6 running on Fedora 13 32-bit

Eclipse 3.6 running on CentOS 5.5 64-bit

Troubleshooting
If you get something like following errors:
Failed to load the JNI shared library /usr/java/jdk1.6.0_21/jre/bin/../lib/i386/client/libjvm.so
Or
/usr/java/jdk1.6.0_21/jre/bin/../lib/i386/client/libjvm.so: cannot enable executable stack as shared object requires: Permission denied
Then do following:
chcon -t execmem_exec_t '/opt/eclipse/eclipse'
and try again.
Related posts:
- Install Sun/Oracle Java JDK/JRE 7u2 on Fedora 16/15, CentOS/RHEL 6.2/5.7
- Install Sun/Oracle Java JDK/JRE 6u30 on Fedora 16/15, CentOS/RHEL 6.2/5.7
- Android SDK and Eclipse ADT on Fedora 16/15, CentOS/RHEL 6
- Install VirtualBox 4.1.8 on Fedora 16/15, CentOS/Red Hat (RHEL) 6.2/5.7
- Install SVN (Subversion) Server on Fedora 16/15, CentOS/Red Hat (RHEL) 6/5.7
72 Comments
Leave a Comment
Trackbacks/Pingbacks
- Android SDK and Eclipse ADT on Fedora 13, CentOS 5.5, RHEL 5.5/6 | If Not True Then False - [...] Your Development Computer and Install Required softwares1.1 Install Sun/Oracle Java JDK/JRE1.2 Install Eclipse SDK 3.6 (Helios)2. Install Andoid SDK2.1 ...

Very good, thanks!
Great tutorial! thx for the info! Work like a charm on Fedora 13 64-bit
Very good, thanks!
Thanks JR! Excellent guide!
Thank you! It was very useful!!
I did this installation, which is great. However now I need to do a clean removal of this eclipse installation. How can I properly remove the reference from the usr/bin/ path?
Hi Andres,
If you installed Eclipse using this guide exactly, then removal is very simple, just remove following files and directory (as root):
Hi!
The installation procedure for eclipse which is published by is awsom. It made it so easy to install eclipse on llinux for me. It is really helpfull. Now the eclipse is installed can you please spare sometime to write a few tutorials for debugging C++ code on eclipse (In case you already have written some tutorials) kindly let me know of them.
Regards
Waqar
Hi Waqar,
Nice to hear that you like this install method! :) Yes I can write more Eclipse tutorials, but I’m not C/C++ programmer. My main programming languages are PHP, Java, Perl and Bash.
I have currently two guides, which are directy related with Eclipse:
Install Android SDK and Eclipse ADT
Install Eclipse plugins guide
In case the previous instruction does not work .. here’s another suggestion to correct the “Failed to load the JNI shared library /usr/java/jdk1.6.0_21/jre/bin/../lib/i386/client/libjvm.so” error:
chcon -t texrel_shlib_t ‘/usr/java/jdk1.6.0_21/jre/lib/i386/client/libjvm.so’
Thanks for chcon hint. Solved my problem
Thanks for that, helped me sort through the process.
very – very good. i was waited next tutorial’s
Nice write-up. Thanks!
Very Good Tutorial. Just one comment, sometimes after installing on CentOS when you get
Failed to load the JNI shared library /usr/java/jdk1.6.0_21/jre/bin/../lib/i386/client/libjvm.so error, you can also resolve it by updating eclipse.ini file with the correct java path.
Thanks a lot!!!
Thanks so much!
I’ve been looking for this for 3 days!
Launch failed.Binary not found !
help me. thank so
Hi rocky,
What happens if you run following command:
thank so much.
when i run command /opt/clipse/eclipse then eclipse run normal.
but when i run a C/C++ project –> Launch failed.Binary not found !
How do you try to “run” C/C++ project? Do you mean compile and run?
eclipse is only the ide, you have to install build tools needed for this (like gcc, g++, make, autoconf etc.)
Basic for compiling are: gcc and cpp which will pull needed dependencies,
but I recomend do a yum groupinstall “Development tools” (I think this is english, try a yum grouplist to be sure)
thank so. i installed :D
Excellent ! Thank you
some notes on this:
- i created a group eclipse and added all users that use eclipse to that group
- i chmod g+swr on all folders of eclipse instalation
- in desktop shortcat I used only name eclipse, not hole path, so it uses the current theme icon (lot nicer)
now any trusted user in group eclipse can run it and update it.
Hi Madalin,
Thanks for excellent notes! Really like your way to create eclipse group.
additional notes:
- add update site (official) http://download.eclipse.org/releases/helios
- install any plugin you need (like pdt, wtc, C++ etc.)
I am getting that pesky error, driving me batty. Yet when I try the workaround, I get:
chcon: failed to change context of /opt/eclipse/eclipse to user_u:object_r:execmem_exec_t: Invalid argument
Hi rkd,
Did you followed install guide exactly? Did you run this command as root user?
Could you post full copy from your console (command and output, or even screenshot), when you run this command.
And please post output of following command:
Very Good!
Oh man, this is so much easier than wrestling with the add/remove software GUI in Fedora 14.
Thanks a bunch! I’m new to Linux and your tutorials have gotten me unstuck a number of times.
Hi,
Thank you for this tutorial, but I have a problem, in fact when I try to launch eclipse from “application->programming->eclipse” I have the following message:
Could not launch eclipse
Failed to execute child process “eclipse” (no such file or directory)
I hope you’ll be able to help me and thank you again.
You will get “No such file or directory” when:
1) Your java is 64 bit (check java -version)
2) Your eclipse is 32 bit (check your download)
To fix – download the “x86-64″ version of eclipse.
Hi Tim,
Yep, that’s the way it is. :)
Thank’s
I’m using on fedora 15 and I was having problems with Eclipse helios.
Why not just install Eclipse 3.6.2 on Fedora 15 with yum?
#yum install eclipse-jdtHi Jacob,
You could install it with yum and it’s very good method install Eclipse 3.6.2 on Fedora 15 currently, but if you are wondering why this guide exists, then think following things:
- This guide is universal method and you could actually use this installation guide almost every Linux system with Desktop and Java installed.
- You could run and control multiple versions of Eclipse at the same time. You could example run 3.5, 3.6 and 3.7 same time. With (default) yum installation this is not possible.
- You could easily move to next version when it’s released, just install it another location, test it and later replace old installation.
- You get always latest Eclipse version.
- You could run yum update without fear that you mess your Eclipse installation if there is update available.
And yes I see your point, but I have my own reasons why I want to install Eclipse this way… :)
Thank you for this tutorial. I have one question though. Using KDE, are there any changes that should be made in the desktop launcher? You specified gnome, so I just wa.nted to ask. Thanks
Hi Steve,
I think KDE should also launch gnome launchers, so try it… :) You might have to log out and log back in…do you get it working?
Worked great thanks!
Hi
Thanks for the tutorial.
I installed eclipse in fedora 13 using the guide exactly.
but when trying to run eclipse,i have the following message
/opt/eclipse/eclipse:No such file or directory.
Hi ushap,
Could you post output of following commands:
Hi
This is the output:
ls -la /opt
drwxrwxr-x. 8 507 1109 4096 Sep 26 00:10 eclipse
drwxr-xr-x. 9 root root 4096 Jun 15 2007 jdk1.6.0_02
-rwxr-xr-x. 1 root root 76989270 Aug 16 20:12 jdk1.6.0_02.tgz
ls -la /opt/eclipse
drwxrwxr-x. 8 507 1109 4096 Sep 26 00:10 .
drwxr-xr-x. 20 root root 4096 Sep 25 16:18 ..
drwxrwxr-x. 2 507 1109 4096 Jun 14 05:37 about_files
-rw-rw-r–. 1 507 1109 18909 Jun 14 03:48 about.html
-rw-rw-r–. 1 507 1109 95367 Jun 14 05:37 artifacts.xml
drwxrwxr-x. 5 507 1109 4096 Jun 14 05:37 configuration
drwxrwxr-x. 2 507 1109 4096 Jun 14 05:37 dropins
-rw-rw-r–. 1 507 1109 9022 Dec 11 2006 icon.xpm
-rwxr-xr-x. 1 507 1109 266168 Dec 11 2006 libcairo-swt.so
-rw-rw-r–. 1 507 1109 8951 Feb 5 2011 notice.html
drwxrwxr-x. 4 507 1109 4096 Jun 14 05:36 p2
drwxrwxr-x. 3 507 1109 4096 Jun 14 05:37 plugins
drwxrwxr-x. 2 507 1109 4096 Jun 14 05:37 readme
You’ll be missing some files /opt/eclipse directory. You don’t have eclipse binary file and that’s why it’s not working.
Was the Eclipse tar package extraction successful? You could check your Eclipse tar package content is eclipse binary also missing there and if yes then download it again and try to install it again.
And please let me know do get it working? :)
Hi,
I will install once again and let you know.
Thank You.
Hi,
I downloaded and installed once again.Its working now.
Thanks.
Excellent! :)
To Jacob who was wondering why to do this instead of yum. I think the main reason, in addition to the multiple instances referred to above, is that for people on some versions of Linux, the repositories are very limited in terms of version number. You might critically need a function that only exists in 3.7, and can’t be found in 3.2. On Centos, the only version available is 3.2.1. This way I can get version 3.7.
To be clear, on this instruction:
## Open eclipse file with your favourite editor ##
nano -w /usr/bin/eclipse
## Paste following content to file ##
#!/bin/sh
export ECLIPSE_HOME=”/opt/eclipse”
$ECLIPSE_HOME/eclipse $*
The file nano -w /usr/bin/eclipse is mostly binary from what I can tell. You want us anyhow to past the following into that file?
#!/bin/sh
export ECLIPSE_HOME=”/opt/eclipse”
and the third line as well after a carriage return? I wasn’t 100% sure if the 3rd line was just for Bash or for the file, I put it into the file, but the process isn’t working for me. When I start Eclipse it just thinks for a while and then does nothing.
Got it to work. I don’t know why but touch creates a file with 82 binary lines. I ran:
rm eclipse
echo “hey” >> eclipse
nano eclipse [then delete 'hey' and add the lines you put above]
chmod 755 /usr/bin/eclipse
then all is good! I have no idea what that other junk was or what the deal with it is.
Hi anon,
This sounds very strange.
You could also use just nano or any editor to create empty file. :)
Your are a hero man! A HERO
Great tutorial…thanx a ton….
but want to point out one thing that i got confused whether “$ECLIPSE_HOME /eclipse $*” had to be included in the text file or not..but later figured out that it has to be included…..
Hi Harshit,
Nice to hear that you got it working! :)
And yes I see your point and yes full /usr/bin/eclipse file content should be:
Hello Friends,
Seems like installing eclipse on RedHat 5 64bit remains a dream for me. I am struggling it from long time. This post gave me some hope. I follow the steps and could able to install it on RHEL5. Here are the list of issues after that
ISSUE 1: No desktop shortcu
ISSUE 2: Not able to launch from console
ISSUE 3: Application->programming->Eclipse, no UI shows up after a long wait, seems it crashed here.
I am using a VMWare virutal machine.
Any help will be appreciated.
Thanks
Anshul
[mail removed]
on launching from console error reported is though running as “root”
/usr/bin/eclipse: line 5: /opt/eclipse/eclipse: Permission denied
and, ls -la /opt/eclipse
[root@susanth-cobia-t-165204024116 eclipse]# ls -la
total 704
dr–r–r– 9 100 users 4096 Sep 16 07:27 .
drwxr-xr-x 3 root root 4096 Oct 12 14:42 ..
dr–r–r– 2 100 users 4096 Sep 16 07:26 about_files
-r–r–r– 1 100 users 18909 Sep 9 23:51 about.html
-r–r–r– 1 100 users 87914 Sep 16 07:26 artifacts.xml
dr–r–r– 5 100 users 4096 Sep 16 07:27 configuration
dr–r–r– 2 100 users 4096 Sep 16 07:27 dropins
-r–r–r– 1 100 users 71023 Mar 22 2011 eclipse
-r–r–r– 1 100 users 410 Sep 16 07:27 eclipse.ini
-r–r–r– 1 100 users 59 Jul 29 2010 .eclipseproduct
-r–r–r– 1 100 users 16536 Feb 26 2005 epl-v10.html
dr–r–r– 46 100 users 4096 Sep 16 07:26 features
-r–r–r– 1 100 users 9022 Dec 11 2006 icon.xpm
-r–r–r– 1 100 users 335360 Dec 11 2006 libcairo-swt.so
-r–r–r– 1 100 users 8951 Feb 5 2011 notice.html
dr–r–r– 5 100 users 4096 Sep 16 07:26 p2
dr–r–r– 10 100 users 28672 Sep 16 07:26 plugins
dr–r–r– 2 100 users 4096 Sep 16 07:26 readme
Hi Anshul,
Try to following (as root):
And then try to start with following command as normal user:
Thank you very much. I very appreciate it.
Hi
I installed as per the instructions mentioned on your site.Everything installed fine.But when i run eclipse,even my hello world program doesn’t run.The console is always showing
No consoles to display at this time.
I had also installed Netbeans which works absolutely fine.What could be the issue?
Hi Nipun,
If it’s not working automatically then try following:
1. Click your project right mouse button
2. Select Run As > Run Configurations…
3. Create new run configuration for your application
4. Check Common tab and Standard Input and Output section.
5. Enable Allocate console (necessary for input)
Then another way is start eclipse from command line and check do get any errors when you try to run eclipse?
My Goodness, I spent hours and hours trying to edit with gedit and Vim…. So stupid, knowing they were binary anyway….
Thanx a whole lot man, You’re an angel from Above
Thanks! Really Helpful.
i didn´t get Eclipse launcher in my desktop. i created the file eclipse.desktop using nano editor and copied the configuration and pressed Ctrl+O and then exited.
For me other modes are working like thru command line; Applications->Programming->Eclipse.
Hi hajo,
You shouldn’t get launcher on your desktop, this means just desktop launcher on your Applications->Programming->Eclipse menu. If you want launcher on desktop then you have to click menu icon with right button and select “add launcher to desktop” or something like that. This is not even possible on Gnome 3 (3.0 and 3.2), but if you have some other desktop or example Gnome 2 then you can add launcher to desktop.
hi JR,
thanks great blog and nice support.
It worked.
carry thanks !! you helped me
after doing the above, I get:
error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
any ideas?
Hi Winston,
So, what command you are running when you get this error message?
Could you post output of following command:
java -versionVery helpful. Thanks!
A Java Runtime Environment (JRE) or Java Development Kit (JDK)
must be available in order to run Eclipse. No Java virtual machine
was found after searching the following locations:
/opt/eclipse/jre/bin/java
java in your current PATH
when i gave the command eclipse i have got the reply above plz help me
Hi deepthi,
Do you have Java installed?
Could you post output of following command:
java -version