【linux環境配置】關於jre環境配置的一個錯誤

來源:互聯網
上載者:User

剛重裝了ubuntu系統,重新設定了jdk1.7環境。在/etc/profile中添加了java環境變數,通過source執行profile指令碼後,使用java和java -version命令可看到jdk的相關資訊。

本以為配置已經成功了,但每次重啟系統之後都會提示沒有安裝jdk這麼奇怪的現象。而且系統還提示:
檢測到系統程式出現問題。

後來重新source了一遍profile檔案,貌似又沒有問題了。但是在eclipse工程中啟動tomcat時,又莫名其妙的崩潰:

org.eclipse.jst.j2ee.internal.deployables.JEEFlattenParticipantProvider## A fatal error has been detected by the Java Runtime Environment:##  SIGSEGV (0xb) at pc=0x00007fb5391895a0, pid=3010, tid=140418841745152## JRE version: 7.0_11-b21# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.6-b04 mixed mode linux-amd64 compressed oops)# Problematic frame:# C  [libwebkitgtk-1.0.so.0+0x14245a0]  void WTF::freeOwnedGPtr<_GdkEvent>(_GdkEvent*)+0x15df0## 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:# /opt/eclipse/hs_err_pid3010.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.#

不得不懷疑jdk的配置出了問題。在終端中,一個個的echo環境變數:


echo $JAVA_HOME  

echo $JRE_HOME

echo $CLASSPATH

echo $PATH

echo $TOMCAT_HOME


結果發現jre路徑不正常,JRE_HOME出了問題。很羞愧的改正了過來,但不是很明白,之前為什麼在環境變數還有問題的情況下,還可以查看java資訊。

重啟,並且在eclipse中重新設定了tomcat服務後,運行正常。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.