How to install Eclipse 3.7 on Ubuntu 11.04
The Eclipse packages in Ubuntu are are very out of date. The latest version in the Ubuntu repos is 3.5.2 where as the latest version of Eclipse is 3.7. I’m posting this because Ubuntu 11.04 uses the new Unity desktop which uses overlay-scrollbars (scrolls bars that are hidden until you hover over them). For some reason Eclipse 5.3.2 doesn’t like to play nice with the overlay scrollbars, and I’d rather use the newest version anyways. With Eclipse, you can just download the tar.gz file from eclipse.org and run it no problem, but I like set things up in a cleaner fashion, so here’s how I did it.
1) Download Eclipse. I got eclipse-SDK-3.7-linux-gtk-x86_64.tar.gz
2) Extract it
tar xzf eclipse-SDK-3.7-linux-gtk-x86_64.tar.gz
Or just be lazy and Right Click > Extract Here
3) Move to /opt/ folder
mv eclipse /opt/ sudo chown -R root:root eclipse sudo chmod -R +r eclipse
4) Create an eclipse executable in your path
sudo touch /usr/bin/eclipse sudo chmod 755 /usr/bin/eclipse sudo nano /usr/bin/eclipse
copy this into nano
#!/bin/sh #export MOZILLA_FIVE_HOME="/usr/lib/mozilla/" export ECLIPSE_HOME="/opt/eclipse" $ECLIPSE_HOME/eclipse $*
save the file (^O = Ctrl+o) and exit nano (^X = Ctrl+x)
5) Create a gnome menu item
sudo nano /usr/share/applications/eclipse.desktop
copy this into nano
[Desktop Entry] Encoding=UTF-8 Name=Eclipse Comment=Eclipse IDE Exec=eclipse Icon=/opt/eclipse/icon.xpm Terminal=false Type=Application Categories=GNOME;Application;Development; StartupNotify=true
save and exit nano
6) Launch Eclipse for the first time
/opt/eclipse/eclipse -clean &
IE7… time to say goodbye Unable to access phpMyAdmin
Thanks alot man.
I switched to Ubuntu recently.
Your walkthrough helped me a lot to install eclipse in a “Natty Narwale” style ;)
bash: /opt/eclipse/eclipse: cannot execute binary file
I got that error message after following all the procedure!
Have you set the proper permission?
sudo chmod 755 /opt/eclipse/eclipse
Got the same error, no permission problems. Can’t figure out whats wrong.
It’s highly probable, that you are using x86 system and try to use x64 eclipse. Download eclipse version form Linux 32 Bit instead of 64 Bit – it should help.
It worked perfectly. Thanks a lot, man.
Hello, I will give it a try. One small correction: The Ubuntu version is 3.5.2 not 5.3.2. I just updated from 10.04 -> 10.10 -> 11.04. Now my Eclipse projects are hosed. So, I’m going to follow your instructions here. Thanks for doing the hard work!
Good catch, and I hope it worked for you
Hey, once again thanks for the info. I finally ended up creating a new VM with 10.04. I found 11.04 would not change the monitor correctly. I went back to this page since I do want to use the latest eclipse. I actually used eclipse for work back in 2005. Now I just want to do some Android work. Here is a site I found somewhat true: http://www.ihateeclipse.com/
excellent work it worked perfectly on Ubuntu 10.10.
Thanks very much. It works a treat. I am using Ubuntu 11.04, is there anyway to make the launch bar icon change from the question mark to the actual eclipse icon.
Did you create this file “/usr/share/applications/eclipse.desktop”? Because in there you set the icon with the line “Icon=/opt/eclipse/icon.xpm”
Hmm, I’m also running 11.04 and the Unity desktop and the icon doesn’t display for me also.
Also, what is the ‘# export MOZILLA_FIVE_HOME …’ line for? Isn’t this a comment? I’ve left it out …
Best wishes
J.
Correction. My version is 11.10.
Having a trawl around there seems to be lots of discussion about changing launcher bar in Unity – the different solutions often seem to be deprecated, such as right clicking the desktop. I think this may have to wait a while …
Fixed. This is working in Unity on Ubuntu 11.10.
I set the environment variables in /etc/environment
MOZILLA_FIVE_HOME has something to do with Eclipse SWT, not sure what though.
Didn’t use categories tag in .desktop file.
The icon wasn’t showing at first because I’d moved eclipse into the wrong directory.
See https://help.ubuntu.com/community/EclipseIDE
thx
MOZILLA_FIVE_HOME is a nightmare… When you hover over a function, you get some documentation. Or maybe you’re typing something and Eclipse makes some suggestions. That window where it displays the information is rendered from the Mozilla browser (I believe). I had problems with it a few months ago: http://stackoverflow.com/questions/6817014/documentation-in-eclipse-shows-up-as-html
thanks a lot – it just works
It say it can’t find the file “mv: cannot stat `eclipse’: No such file or directory” where should the file be? I have try everything and it doesn’t work. Please Help! And Thanks anyone who help :)
I DID IT!!! I DID WOOOTT!!!! WOOOTT!!!!
how you did it can you explain it??
[...] How to install Eclipse 3.7 on Ubuntu 11.04 [...]
Thanks a lot man worked like a charm.
good!thanks a lot
Should the first line in Step #3 be:
sudo mv eclipse /opt/
Thanks for the clear step-by-step!
Ditto
True!
Thanks lot.
Thanks!
thanks!
- @caravaggisto
Thanks .. Worked fine.
Hi,
Will this setup work on 10.04? I am using 10.04 and the only place it is creating problem is in creating the gnome menu item. It says the file does not exists.
Great job, thanks a lot !
I follow your instructions but I still couldn’t run eclipse.How can I manually remove it so I can reinstall it again.
Thank you! Your instructions were concise and accurate. Worked flawlessly.
Just a quick comment – you might want to include ‘sudo’ in step 6.
i.e. “sudo /opt/eclipse/eclipse -clean &”
Woops, it seems I missed a step! No need for the sudo :) You may need some extra ‘cd’ commands though to go from (presumably ‘/home//Downloads’ to ‘/opt’ for the modifications to ‘/opt/eclipse’
thanks man you are the guy thanks now i want to know if u can help me again installing the netbeans it says no JVM found… but i have already installed the JDK7…. some help please?
Definitely a huge help. Thanks!
cool! it works !!
How do you uninstall this, this is not the right version I need
Ok. I did it. I just don’t understand why the ownership has to go to root. I can’t even enter the folder after I did that. Can anyone explain please. Everybody is very happy. Probably I just don’t get it. :(
I saw it. I had to do
sudo chmod -R +x /opt/eclipse/
so now I can access it and use my eclipse and root is the owner.
I kinda got the idea. Now I can only read and execute eclipse, cannot change anything in it , therefore crash it bigtime i suppose.
Thanks for the tutorial :) learned a lot from it :)
Swear to god the first *nix guide ive read where everything went acording to plan..
Thanks dude….
Man, I feel exactly in the same way. Thanks to author!
Thanks a lot! Everything’s fine, the only suggestion is to use “sudo mv eclipse /opt/” except “mv eclipse /opt/” (I’ve tried on Linux Mint 11).
Thanks to you, now I can try Java 7 in Eclipse (earlier it was impossible, even though I had installed both openjdk 7 and Oracle jdk 7 and set one of them as default JRE, but couldn’t set “compiler compilance level” to a higher value then 1.6).
How to uninstall ?
Just delete the directory /opt/eclipse/
You should also nuke
/usr/share/applications/eclipse.desktop
/usr/bin/eclipse
for a cleaner removal
Note that Ubuntu 11.10 has Eclipse 3.7 packages.
Thank you ..it has worked for 11.10 too!!
Thanks for this guide, I was wondering, is it possible to have 32bit eclipse version next to a 64bit version? I think it can, but what lines do I need to replace?
Just the “eclipse” lines to “eclipse32″ ?
Thank you so much, It worked fine, thanks a lot friend
Again, thank you. Too bad there is not an Eclipse repository that would simplify this.
This tutorial was instrumental in my learning some basic Linux and bash functions. I kept having errors when I would try to install plug-ins, until I changed ownership of the /opt/eclipse folder from root to my user. The error that Eclipse gave me appeared to have nothing to do with ownership, but said that certain Maven dependencies could not be found. I was able to confirm that the dependencies actually were installed. Finally, it occurred to me that maybe Eclipse was looking for those dependencies in the root folder, rather than the opt/eclipse folder. The program installs plug-ins without a hitch after that change.
I have seen other advice to install Eclipse in the home directory, which could have the benefit of not having to navigate around ownership issues.
Thanks for the tips. No longer intimidated by the bash!
Ric
Hi. Thank you very much. It really helps a lot. I didi it. Would you please let me know how you have learned all these codes?
Best Regards
Thank You so much man .. that was really easy and quick
You are good Carlin
Thanks a lot!
This works fine!
I have a problems in last stage.
when a run a command.
‘/opt/eclipse/eclipse -clean &’
I found
‘/opt/eclipse$ /opt/eclipse/eclipse
bash: /opt/eclipse/eclipse: cannot execute binary file’
what is solution for this?
Hi. First thank you for tutorial, but I have this problem and i don’t know how to solve it when I execute the desktop file :S
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
Hey, I had the same issue. Check this out:
https://help.ubuntu.com/community/EclipseIDE#No_Java_Virtual_Machine_found
Here’s some more info…
Make sure you don’t already have java installed. To check, look in /usr/lib/jvm. If you see something there, . If not, check the results of these commands:
$ dpkg -l '*jdk*'
$ dpkg -l '*java*
If you see something like:
un openjdk-7-jre (no description available)
...
un sun-java6-jre (no description available)
with the
unat the beginning, it means they’re not installed. To remedy that just run apt-get on either openjdk or sun-java (I did openjdk):$ sudo apt-get install openjdk-7-jdk
()
If you’d rather install the JDK from Sun (rather than the open version), .
Hope this helps!
-@caravaggisto
Sorry for the HTML formatting errors. Redux:
Make sure you don’t already have java installed. To check, look in /usr/lib/jvm. If you see something there, try this. If not, check the results of these commands:
$ dpkg -l '*jdk*'
$ dpkg -l '*java*
If you see something like:
un openjdk-7-jre (no description available)
...
un sun-java6-jre (no description available)
with the
unat the beginning, it means they’re not installed. To remedy that just run apt-get on either openjdk or sun-java (I did openjdk):$ sudo apt-get install openjdk-7-jdk
(credit)
If you’d rather install the JDK from Sun (rather than the open version), then check this.
Hope this helps!
-@caravaggisto
I’m on Ubuntu 11.10 and followed all steps in the original post. The application icon shows up under the Dash home’s More Apps menu, and can be run that way or from the terminal. Unfortunately, when I run it either way, Eclipse doesn’t show up in the side bar, and can’t be alt-tabbed to either (but Eclipse is running and I can click into it and do work). Any ideas, or was I not making sense?
huh, everything seems fine after a reboot… thanks!
Vielen Danke Man… :)
thanx alot….
Very useful, thanks a lot from Holland
thank you very much.
I have already installed eclipse by following your guild.
Thanks man, just worked smoothly.
Thank you so much! worked perfectly.
worked like charm
:)
hmfr… I just get a error 5:Syntax error: “(” unexpected
Anyone knows why?
Ahh! Tried installing a 64bit eclipse on a 32bit system
Thanks a lot !! Great effort.
Thanks! Works perfectly.
This worked as charm, very concise instructions, thanks for posting!
I’m new in Ubuntu but have used Eclipse for years. I Installed Eclipse in Ubuntu and after starting Eclipse wanted to create a java project. But I can just create a project. No Java-connections are shown. Usually I can configure Java-environment in eclipse under window-preferences. But no entries for java are available. Do you have an idea for this phenomena?
Which version of eclipse did you install and are you talking about Java EE? I’ll do my best to help, but you’ll probably have better luck and faster responses over at the eclipse forums.
It works: installing Eclipse 3.7.2 classic edition on Ubuntu 11.04, both 32 bits.
Great job. Worked perfectly! Thanks a lot!
Cheers
it worked perfectly!
mine xubuntu just doesn’t recognize the command
sudo chmod -R +r eclipse
but it seems to work anyway.
thanks a lot from sicily!
I had to change the exec line to
Exec=/opt/eclipse/eclipse
or else it wouldn’t launch when I clicked it from the launch menu. It worked fine from the applications dir though.
Thank you for the guidance, it worked like charm on Ubuntu 12.04.
Learned something from this and I am sure I will use this method for other applications as well.
Cheers
THANK YOU!!!! IT VERY HELPFUL!!!!
This is a great adventure, I will give it a try and hoping it will work perfectly as I am very much in need of eclipse on my Ubuntu 10.04.
Congrats!!!!!!
Thank you Much! This was very easy and simple to install with your guide.
Thanks its working perfectly
awesome guide dude.
thanks, nice post. best way to download the latest version of eclipse in Ubuntu
You made me a happy camper… thanks for the info.
Thanks a lot for this tutorial
Thank you for sharing. First I had to uninstall my previous version installed with the Ubuntu software center and Synaptic and then follow your guidelines.
Many Many Thanks. This helped me get Eclipse with ADT and Android running on Debian 6 (64 bit) with xfce.
awesome. thanks :)
Thanks, nice post and it just works, much needed for the JavaEE devlopment!
It did work. However be sure u are using the right package. Always perform “#uname -m ” command before choosing the eclipse package (for 32 bit or 64 bit OS). I got wrong with that.
Anyway thanks a lot.
Thanks a lots.. it is very helpful. :)
Hello,
I’m already working with Helios, I don’t want to upgrade or uninstall this version and now i want to install Indigo. In this case how can i install the other version.? Since I already have an eclipse folder in /opt.
Is it possible to have both Helios and Indigo versions together?? Thanks in advance.
As a long time user fo Eclipse on Windows, I was excited to try it on Linux. I tried twice, unsuccessfully, to install Eclipse Indigo on Ubuntu 12.04 using Software Center. Much frustration ensued. Your instructions worked flawlessly!
mv eclipse /opt/
# for dense ones like me, you should now ‘cd /opt’ then:
sudo chown -R root:root eclipse
sudo chmod -R +r eclipse
Thanks!!!
thanks a lot dude :) it worked pretty awesome :)
Thanks a lot! :-)
Thx a lot ! it save my time :D
Hey dude, excellent job. Worked as a charm
just wondering what happens if you change the owner to root (as you are doing) and later want to upgrade some other components or plugins. Does the plugins folder goes exclusively to the user who is running eclipse or it will require root privileges to upgrade/downgrade plugins? BTW: great post!
[...] How to install Eclipse 3.7 on Ubuntu 11.04 [...]
thank alot ,man it works well
Thanks for this simple tutorial.. It worked fine however when I try to update the eclipse it says “Insufficient privileges to install this update”… Do I need to set any other permission as well.. or every time I need to start it using “sudo eclipse”
I think that’s a bug in Ubuntu 12.04/eclipse. I installed from the repo site and it fixed the problem. Go to Help>Install new software> then click on “Add”, name it what you want.i’m using Juno so my update address is “http://download.eclipse.org/eclipse/updates/4.2″. If you are using a different version of eclipse, replace the “4.2″ with the platform you’re using.
I don’t know if this will help you but it worked for me.
it is really helpful, thx a lot:-))
Thanks a lot. Finally I could install Eclipse Indigo on Ubuntu 11.04 following your instructions.
Wroks perfect with eclipse juno on ubunto 12.04
Thank you for the guidance, I am new to work in linux, and it has been a bit difficult, I live in venezuela and my mother tongue is spanish, I do apologize for the mistakes in my writing,
I used ubuntu 11.04 and I have read in some post that I need to install java befor trying to install eclipse.
Could you send to my mail a bit of more information and how to proceed.
Thanks. keep up your good work.
Worked even on CentOS 5.8. Thank you so much for the guidance:)
Finally a nice and clear explanation! Thank you very much sir.
Thanks alot, I wish you’d made some comments regarding what you type in the files – it works, thanks man.
Hello! I understand this is kind of off-topic but I needed to ask.
Does building a well-established blog such as yours require a lot of work?
I’m completely new to running a blog however I do write in my journal every day. I’d like to start
a blog so I can share my experience and thoughts online.
Please let me know if you have any kind of recommendations or tips
for brand new aspiring blog owners. Appreciate it!
Can I use this one also for Eclipse 4.2?
Yes it will work fine, you obviously need to change the script to match the vs your installing, otherwise it should work fine.
It worked perfectly…… Gud work……
Thanks a lot man…
Thanks for your tutorial ^_^
It works fine with my eclipse-juno, and ubuntu-10.04
Excellent. I did not undestand many ofthe steps but it worked. I am new to Linux.
Thanks.
Thanks a great deal for the instructions.Helped me a great deal.
Thanks! Great Help!
Works fine on Ubuntu 12.04.
Thank you :)
Thanks a lot for that description … works fine !!!
Thanks a lot,
Well done! Awesome!! Works like a charm!!!
Thanx realy this form is very usefull for me……. ……
Thank you very much great tutorial! very helpful
Thanks a lot works fine, nice simple tutorial.
This is good thanks men
Marvellous! You did a really good job! Thanks!
I used this instructions to install Eclipse 4.2 on Ubuntu 12.04 with classic Gnome; who wants Unity :)
It worked perfectly, thank you!
Excellent! Thanks a lot!!
still can’t run it.
done this on terminal:
param@param-desktop:/media/PARAMVEER$ mv eclipse /opt/
mv: cannot create directory `/opt/eclipse’: Permission denied
param@param-desktop:/media/PARAMVEER$ sudo mv eclipse/opt/
mv: missing destination file operand after `eclipse/opt/’
Try `mv –help’ for more information.
param@param-desktop:/media/PARAMVEER$ sudo mv eclipse /opt/
param@param-desktop:/media/PARAMVEER$ sudo chown -R root:root eclipse
chown: cannot access `eclipse’: No such file or directory
param@param-desktop:/media/PARAMVEER$ cd /opt
param@param-desktop:/opt$ sudo chown -R root:root eclipse
param@param-desktop:/opt$ sudo chmod -R +r eclipse
param@param-desktop:/opt$ sudo touch /usr/bin/eclipse
param@param-desktop:/opt$ sudo chmod 755 /usr/bin/eclipse
param@param-desktop:/opt$ sudo nano /usr/bin/eclipse
param@param-desktop:/opt$ sudo nano /usr/share/applications/eclipse.desktop
param@param-desktop:/opt$ /opt/eclipse/eclipse -clean &
[1] 6540
param@param-desktop:/opt$ bash: /opt/eclipse/eclipse: Permission denied
sudo /opt/eclipse/eclipse -clean &
[2] 6560
[1] Exit 126 /opt/eclipse/eclipse -clean
param@param-desktop:/opt$ sudo: /opt/eclipse/eclipse: command not found
Excellent tutorial..very eay to follow up…thanks a lot…
Thank you, it’s run.
Worked perfectly but i change the Exec link on the applications desktop. Nice post
I have followed the same steps ,however I am getting below error for the last step.
/opt/eclipse/eclipse: Permission denied
[...] de respecter le FHS Unix) mais pour cela, je pense que vous aurez besoin d’un petit tuto : tutoriel d’installation Eclipse sur Ubuntu mais il peut très bien s’adapter à d’autres [...]
[...] be fair the rest of my instruction here is bits I took from this person’s blog post about another distro of eclipse and ubuntu, the important difference to notice is that he [...]
Come back again only to say thanks from heart..
Thank very much.
Thanks a lot.
This is very fascinating, You are a very professional blogger.
I’ve joined your rss feed and look ahead to in quest of extra of your great post. Additionally, I’ve shared
your website in my social networks