简体   繁体   English

Eclipse在basicOS中崩溃

[英]Eclipse crashes in elementaryOS

Everytime I try to run eclipse, my system crashes. 每当我尝试运行eclipse时,我的系统崩溃了。 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 我已经安装了JDK和Maven,并从官方网站下载了Eclipse

It's a bug in the SWT porting on GTK3. 这是SWT移植到GTK3上的一个错误。 There is no real solution, but there is a workaround by forcing Eclipse to use GTK2. 没有真正的解决方案,但强制Eclipse使用GTK2有一种解决方法。

I assume your Eclipse folder is /opt/eclipse and that you don't have write permissions in this folder. 我假设您的Eclipse文件夹是/ opt / eclipse,并且您在此文件夹中没有写入权限。 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 手动修改eclipse.ini

You need to open eclipse.ini in your Eclipse folder: 您需要在Eclipse文件夹中打开eclipse.ini:

sudo -i scratch-text-editor /opt/eclipse/eclipse.ini and add the following lines: sudo -i scratch-text-editor /opt/eclipse/eclipse.ini并添加以下行:

--launcher.GTK_version --launcher.GTK_version

2 2

It's important to add these lines before --launcher.appendVmargs, otherwise Eclipse will crash. 在--launcher.appendVmargs之前添加这些行很重要,否则Eclipse会崩溃。

for more reference, plz check 有关更多参考,请检查

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

I was having this problem (Eclipse freeze, crash, with elementary OS Freya). 我遇到了这个问题(Eclipse冻结,崩溃,基本操作系统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. 我的Eclipse安装是使用安装程序完成的,所以我的路径与Prade jo表示的不同,但他的解决方案是正确的。

sudo scratch-text-editor

Browse to home -> yourUserName -> eclipse -> java-mars (or whichever version you have) -> eclipse -> eclipse.ini 浏览到主页 - > yourUserName - > eclipse - > java-mars(或者你有哪个版本) - > eclipse - > eclipse.ini

The line before "--launcher.appendVmargs", add: “--launcher.appendVmargs”之前的行,添加:

--launcher.GTK_version
2

Should now be good to go. 现在应该好好去。

I had the same issue with Oxygen and Elementary Loki. 我和Oxygen和Elementary Loki有同样的问题。 Changing to GTK2 worked for me. 换到GTK2对我有用。

Try running eclipse from the terminal to see the problem. 尝试从终端运行eclipse以查看问题。 Most likely it is an X server problem. 很可能是X服务器问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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