简体   繁体   中英

Eclipse crashes in elementaryOS

Everytime I try to run eclipse, my system crashes. That happens when it appears the window that asks me to select the workspace. I've installed JDK and Maven, and downloaded Eclipse from the official website

It's a bug in the SWT porting on GTK3. There is no real solution, but there is a workaround by forcing Eclipse to use GTK2.

I assume your Eclipse folder is /opt/eclipse and that you don't have write permissions in this folder. Please change the commands, if your set-up differs.

There are two ways to apply this workaround, a long and explanatory way, and a short one for the lazy ;)

  1. Modifying eclipse.ini by hand

You need to open eclipse.ini in your Eclipse folder:

sudo -i scratch-text-editor /opt/eclipse/eclipse.ini and add the following lines:

--launcher.GTK_version

2

It's important to add these lines before --launcher.appendVmargs, otherwise Eclipse will crash.

for more reference, plz check

https://elementaryos.stackexchange.com/questions/1276/eclipse-mars-freezes-after-splash-screen

I was having this problem (Eclipse freeze, crash, with elementary OS Freya).

My Eclipse installation was done using the installer, so my path was different to what Prade jo indicates, but his solution was right on.

sudo scratch-text-editor

Browse to home -> yourUserName -> eclipse -> java-mars (or whichever version you have) -> eclipse -> eclipse.ini

The line before "--launcher.appendVmargs", add:

--launcher.GTK_version
2

Should now be good to go.

I had the same issue with Oxygen and Elementary Loki. Changing to GTK2 worked for me.

Try running eclipse from the terminal to see the problem. Most likely it is an X server problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM