This is guide, howto install latest Eclipse Mars.2 4.5.2 on Fedora, CentOS and Red Hat (RHEL). This guide should work with Fedora 24/23/22/21/20/19/18/17/16/15/14/13/12, CentOS 7.2/6.8/5.11 and Red Hat (RHEL) 7.2/6.8/5.11 and even with earlier versions. Latest working version on CentOS/RHEL 5.11 is Eclipse Luna 4.4.2.
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 Mars.2 4.5.2 on Fedora 24/23/22/21, CentOS/Red Hat (RHEL) 7.2/6.8/5.11
1. Install Sun/Oracle Java JDK 8
2. Download Eclipse Mars.2 4.5.2
Download suitable version from www.eclipse.org/downloads. This guide uses Eclipse IDE for Java Developers version. Another popular versions are Eclipse IDE for Java EE Developers and Eclipse for PHP Developers. Select also 32-bit or 64-bit version depending on your system. You can download Eclipse Luna 4.4.2 for CentOS/RHEL 5.11 from here.
3. Change root user
su - ## OR ## sudo -i
4. Extract Eclipse package (example to /opt directory)
## x86 - 32-bit ## tar -xvzf eclipse-java-mars-2-linux-gtk.tar.gz -C /opt ## x86_64 - 64-bit ## tar -xvzf eclipse-java-mars-2-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 favorite 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 Mars.2 4.5.2 Exec=eclipse Icon=/opt/eclipse/icon.xpm Terminal=false Type=Application Categories=GNOME;Application;Development; StartupNotify=true
8. Start Eclipse 4.5.2
From command line use eclipse command (as normal user!)
9. Eclipse 4.5 screenshot, running on Fedora 22 64-bit
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
/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.