I have just re-installed the Ubuntu system and reconfigured the jdk1.7 environment. Java environment variables are added to/etc/profile. After the profile script is executed using source, the JDK information is displayed by running Java and Java-version commands.
I thought the configuration was successful, but every time I restarted the system, I was prompted that JDK was not installed. The system also prompts:
System Program problems detected.
Later, I re-source the profile file, and it seems that there is no problem. However, when Tomcat is started in the Eclipse project, it is inexplicably crashed:
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.#
I have to suspect that the JDK configuration is faulty. On the terminal, the echo environment variables are as follows:
Echo $ java_home
Echo $ jre_home
Echo $ classpath
Echo $ path
Echo $ tomcat_home
The result shows that the JRE path is abnormal and jre_home has a problem. I am ashamed to make corrections, but I don't quite understand why I can still view the Java information when there are still problems with the environment variables.
Restart and re-configure the Tomcat service in eclipse.