【linux环境配置】关于jre环境配置的一个错误

来源:互联网 发布:python运行 编辑:程序博客网 时间:2024/06/05 00:23

刚重装了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服务后,运行正常。



原创粉丝点击