Ubuntu – Is it necessary fix eclipse.desktop to use Eclipse launcher in Ubuntu 16.04

16.04eclipsejavalauncherunity

I've been trying to use Eclipse in Ubuntu 16.04. I have read that, in order for Eclipse to work properly, it requires the following code to be inserted in eclipse.ini:

--launcher.GTK_version
2

It works, but only when I run it through the terminal. When clicking on the launcher icon, Eclipse seems slow as before inserting the code.
Is it necessary to fix the eclipse.desktop file to run it? If so, how?

Best Answer

I had the same problem. Changing the eclipse.ini file as mentioned by #LuteceTheCrab seems to work only when eclipse is launched from the command prompt. However the unity launcher doesn't seem to respect the configuration in the eclipse.ini file.

Upon reading the eclipse.ini in ~/.local/share/applications directory, I realized that the Exec attribute value is set to absolute parameters.

I had to replace the value of the Exec parameter with the path of the eclipse executable.

[Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Name=Java - Eclipse Icon=eclipse.png Path=/home/[username]/softwares/eclipse Exec=/home/[username]/softwares/eclipse/eclipse /* <- Note this line */ StartupNotify=false StartupWMClass=Eclipse OnlyShowIn=Unity; X-UnityGenerated=true

This causes the launcher to launch the executable which picks up the .ini in the same directory.

Don't put /* <- Note this line */ in the .desktop file. I have used it to highlight the line in this response.