Eclipse was working as good as anything on 14.04. I did a clean install of 16.04 and installed Eclipse. But it runs a Java program only once after which it just hangs during subsequent attempts before I remove and reinstall it. I have tried many things, since in the beginning I needed CDT as well. Right now, I just want to remove everything related to eclipse and do a fresh install (remove all the configs and dependencies). Please note that I used Eclipse installer to install Eclipse and the eclipse icon image is also not appearing (the default ubuntu ? is appearing).
I had something the same with 16.04 and Eclipse Mars. I thought it had frozen but in fact it was running very, very slowly. The problem is the version of GTK+ 3, shipped with 16.04. Fortunately the solution is very easy. Open a terminal and then type
export SWT_GTK3=0, then start Eclipse from the terminal. If that works, then a more persistent fix is to put the 2 lines below, as they appear in your
before the line:
The bug is filed with Ubuntu at bug 1552764
My recomendation is that you install Eclipse Mars from the webpage: http://www.eclipse.org/downloads/index-developer.php?release=mars
But first you have to install java8 (not java9 because Eclipse Mars doesn't work with that version). In Ubuntu you can do this with: sudo apt-get install openjdk-8-jre openjdk-8-jdk
And then .. and just if you have other java version, you have to select java8 with this command: sudo update-alternatives --config java
Voilà! That worked for me! :)
By starting the application from the command line (the terminal) it is sometimes possible to get more information about why the program fails to start. For example (assuming that eclipse is in your path, otherwise start it from the folder where it is installed/unpacked):
user@machine:~$ eclipse Unrecognized VM option 'MaxPermSize=256m' Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.
In this case it looks like the line
in the file
eclipse.ini is the problem. Simply remove that line (create a backup of the
eclipse.ini file first) and try to start the program again.
Above solution worked on
Eclipse Version: Mars.2 Release (4.5.2) on a machine upgraded from 15.10 to 16.04
Apparently this is a known bug in Ubuntu 16.04. This affects not only eclipse but several other applications too.
Before the fix is released here is a quick fix that works. Open terminal and type
$ initctl restart unity-panel-service
This will bring back the Menus for the current session. But you may want to do this again if you restart your machine.