This article shows you the way to install the latest version of Eclipse on Linux. There are other ways to install Eclipse using scripts to automate the installation. However, I prefer the manual installation method explained in this article so that you know where your files go. Later if you want to remove the Eclipse, it is just two commands as explained at the end of the article.
If you do not have Java in your system, follow this link and install the Java first.
If you do not have Java in your system, follow this link and install the Java first.
Step 1:
Download the desired version of Eclipse from the official site:
Step 2:
Open the Terminal (Ctrl + Alt + T) and enter the following command to change the directory.
cd /opt
Step 3:
Enter the command given below to extract the Eclipse from ~/Downloads directory. If your downloaded file is in any other directory, replace the last parameter by the actual file path.
sudo tar -xvzf ~/Downloads/eclipse-jee-2019-12-R-linux-gtk-x86_64.tar.gz
Step 4:
Open another Terminal (Ctrl + Alt + T) and enter the following command to create a shortcut file for eclipse.
gedit eclipse.desktop
Step 5:
In the opened gedit, copy and paste the following text.
[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
Name[en_US]=Eclipse
Save and close the gedit.
Step 7:
Enter the following command in the terminal to install the shortcut.
sudo desktop-file-install eclipse.desktop
Now search for Eclipse in the dashboard and open it.
Step 1:
First, remove the menu entry you created in Step 7.
Step 2:
Delete the /opt/eclipse folder.
Upgrade Eclipse
If you have already installed Eclipse using the above method and would like to upgrade the Eclipse to the latest version, just remove the Eclipse from /opt director and follow Steps 1 to 3 from the installation process.sudo rm -rf /opt/eclipse
Remove Eclipse
Removing the Eclipse installed as described in this article is just two lines of commands.Step 1:
First, remove the menu entry you created in Step 7.
sudo rm /usr/share/applications/eclipse.desktop
Step 2:
Delete the /opt/eclipse folder.
sudo rm -rf /opt/eclipse
29 comments
Write commentsHow unisntall whit complements?
ReplyI have problem about installing eclipse on ubuntu 18.04 ! help me ; please!
ReplyHi,
ReplyPlease share the error logs from the above-mentioned log file.
Hi, I have got the following error when launching eclipse on ubuntu 18.04.
Reply!SESSION Wed Feb 06 11:01:03 PST 2019 ------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2019-02-06 11:01:03.962
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:626)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Please help, Thanks.
Hi Gobinath,
ReplyThe link in Step 1 leads to a eclipse-inst-win64 download. Where can I download eclipse-jee-mars-R-linux-gtk-x86_64.tar.gz for Linux? Thanks.
Hi,
ReplyI've updated the link.
Hi,
ReplyDid you download eclipse-jee-mars-R-linux-gtk-x86_64.tar.gz and installed as described in the article or installed it using any other methods?
It happens if a jar file is missing in the eclipse folder. Please check this Stack Overflow answer for the solution.
Uninstalling eclipse is easy if you followed this article to install eclipse. Just open a terminal and enter the following commands:
Reply# Remove eclipse folder
sudo rm -rf /opt/eclipse
# Remove the menu entry
sudo rm /usr/share/applications/eclipse.desktop
You're done!
Hi! I got this error when i try to open eclipse.
ReplyAn error has occurred. See the log file
/home/ahmad/workspace/.metadata/.log.
I was check that folder, and there's nothing
Hi,
ReplyDelete the workspace folder and try to open Eclipse again.
NOTE: If you have any projects in the workspace folder, backup them before deleting the folder.
Can this instruction be followed to also install on Linux Mint since Mint is based on Ubuntu?
ReplyYes you can (I am using LM) but use xed in place of gedit
Replywhy we have so many steps to install eclipse in linux?
ReplyIn windows we could do it with single mouse click
Just curious though. What difference does it make whether I use xed or gedit? They are both text editors.
ReplyWindows bundle applications into just one executable file and all you have to do is double-click and follow the prompt. Linux was not originally meant to use GUI but to just type commands and hit the enter key. Though Linux distributions also have their bundled executables for applications too but dependencies is usually the problem with Linux applications. One package will depend on another or require a lower version of a package of which you are having a higher version. Linux package managers makes package installations easy if the one you want to install is available from the repository. And Ubuntu is actually having Eclipse in its repository but it is the old version. So you need to go through all that steps to install the latest version from the provider's website. As much as Linux is difficult to use, I still prefer it to Windows. That's just my own preference and not trying to say one is better than the other.
ReplyHi,
ReplyEclipse is really a portable application (doesn't matter whatever the OS is. years ago when I was a Windows user I did download the zip file and extracted it somewhere and created a desktop shortcut). You can download and extract the file and just start using it. This article helps you to install it for all users and creates a shortcut in the start menu.
Of course Linux supports installers. Most of the times you can install a software using single command (for example Gimp or LibreOffice) because the software creators also provide Linux installers and repositories. In case of Eclipse, the Eclipse foundation does not offer its own repository. So I won't blame Linux. It's the choice the eclipse people made. On the other hand, personally I prefer to install a software manually because it gives more control over what goes where. For example, nowadays Java provides an installer for Linux (deb and rpm) but still I prefer to install it manually.
Hi,
ReplyI was in your place years ago. It was really hard to switch and I missed a lot of applications and features at the beginning but eventually things changed other way around. Now I miss features in Windows. Linux is hard to learn because we are so much used to Windows. It may take time but you will love it (since you're a developer you will be addicted to Linux like me ;-) )
Few years ago, LM team cloned gedit, renamed it to xed and changed the UI to traditional menu bar because gedit GUI (GTK 3 stuffs) does not play well with rest of the Linux Mint environment.
ReplyNowadays, both are being developed independently by Gnome and LM teams. I recommend xed because in recent LM releases, xed is the default editor. Still you can install gedit but I don't find a reason to do so.
I agree with you. I even recommend my students to learn a programming language without an IDE (Sublime + Terminal is the best) because it helps them to learn the language. Otherwise, only thing they remember is Ctrl + Space :-) However, schools go with IDEs so we have to go with them.
ReplyI think it's time for you to update this guide. It's not relevant for the new Eclipse. I just installed Eclipse using an installer script in the package archive. You should check it out.
ReplyHi,
ReplyI am aware of the Eclipse installer but I prefer the manual installation method. However, I will update the article including other ways to install Eclipse.
Hello, I've been trying to open the eclipse I had downloaded after I closed the window and I cannot find it anywhere now. I followed the directions to the best of my ability but it keeps saying that gedit is not a command, I tried xed too? I'm really confused and need to figure out how to open my already downloaded eclipse...
ReplyHi,
ReplyWhich Linux distribution are you using? If you followed Step 2 and 3, you should be able to open Eclipse from the terminal by executing the following command:
/opt/eclipse/eclipse
Thanks for this. Worked really well for me
ReplyBom dia, exelente Post parabens mesmo, sensacional, procurei em varios sites e blogs conteudos sobre nemhum com uma documentação certinha como a sua, cara incrivel, nao deu nemhum erro fiquei 1 hora tentando installar, achei este post, demorei 2 mint e olha la. valeu mesmo!! mais uma ves parabens
ReplyHi, I have the same problem and in '/opt' there is no 'eclipse' directory, only the eclipse-installer.
ReplyI followed every step very carefully. There is however a '.eclipse' file in my home directory. Also I wasn't sure if the 'eclipse.desktop' file is meant to go in my home directory.
I hope you can help,
Thanks
Hi,
ReplyDid you download the eclipse-jee-2019-12-R-linux-gtk-x86_64.tar.gz file? There is an Eclipse Installer I think you've downloaded the installer.
Thanks for this. Worked really well for me
Replynice.best apk
ReplyEmoticonEmoticon