2

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?

Caio
  • 123
  • Is the launcher icon that you're clicking in the same directory as eclipse.ini? – rustynuts May 11 '16 at 12:14
  • @rustynuts No, it's located at ~/.local/share/applications. Does it help getting it to eclipse.ini's folder? – Caio May 12 '16 at 10:48
  • Did you install eclipse from the Ubuntu repos or did you download and extract it? – rustynuts May 12 '16 at 23:33
  • @rustynuts Downloaded and extracted it. I tried using Enide, then I downloaded the regular Java version through the Oomph installer. – Caio May 13 '16 at 09:54

2 Answers2

2

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.

0

Both the eclipse.ini and launcher icon should be in the same extracted directory and there shouldn't be an issue with eclipse.desktop.

Did you insert:

--launcher.GTK_version 2

before --launcher.appendVmargs in eclipse.ini?

rustynuts
  • 176
  • Yes. This is the segment of eclipse.ini in which I have put it:

    --launcher.defaultAction openFile --launcher.GTK_version 2 --launcher.appendVmargs -install

    I'm sorry, now that I think of it, the launcher is actually in the same folder as eclipse.ini, I've mistaken it for eclipse.desktop (this, however, is at the specified location - ~/.local/share/applications).

    Eclipse seem faster after all this time, though the issues persist.

    – Caio May 17 '16 at 12:32