1. 程式人生 > >ubuntu eclipse自動提示崩潰導致自動關閉

ubuntu eclipse自動提示崩潰導致自動關閉

        自從剛開始學ubuntu,就感覺遇到了很多蛋疼的問題,這幾天就一直困繞在這個問題裡,本來以為裝完jdk,配置完環境變數,在eclipse下進行環境開發是手到擒來的事情,可是沒想到居然悲劇了,每次用到eclipse的自動提示功能的時候,eclipse就自動崩潰,屢試不爽啊!最後沒辦法,只能上網找解決方法,可是網上那些方法大都是jdk分配記憶體太少的問題,無法解決我的現狀,最後甚至直接想放棄在ubuntu下面做開發的想法,

        可是今天開啟電腦,還是覺得有點不甘心,又開始解決問題,我現在命令列介面運行了eclipse:

        sudo ~/Software/adt-bundle-linux-x86_64-20131030/eclipse/eclipse

        又嘗試了eclipse下自動提示的功能,果然還是自動關閉了,心灰意冷的同時,看見命令列介面報瞭如下錯誤:

Error Loading DDMS Preferences
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f538f15c2a1, pid=14806, tid=139998765790976
#
# JRE version: Java(TM) SE Runtime Environment (8.0_25-b17) (build 1.8.0_25-b17)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libsoup-2.4.so.1+0x6c2a1]  soup_session_feature_detach+0x11
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/dan/hs_err_pid14806.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

      看到裡面這樣一句話:C  [libsoup-2.4.so.1+0x6c2a1]  soup_session_feature_detach+0x11,便將這句話複製上百度進行查詢,沒想到真的讓我解決了問題,網上的說法是這樣的

然後在此檔案中追加:

-Dorg.eclipse.swt.browser.DefaultType=mozilla

-Dorg.eclipse.swt.browser.UseWebKitGTK=true
-Dorg.eclipse.swt.browser.XULRunnerPath==/usr/lib/xulrunner-2

第一條是開啟jsp檔案閃退,第二、三條是開啟class檔案閃退,完全不是使用程式碼提示的原因。

但是問題就這樣解決了,再也不會閃退啦。

之前一直沒法找到問題的所在原來是,問題本身跟自動提示功能出錯關係不大,可能用到其他功能的時候也會自動退出,只不過是我太糾結與之前的問題了.

解決問題的文章出處:http://www.linuxidc.com/Linux/2014-05/101750.htm

感謝該博主