OpenJDK problem on Ubuntu System

OpenJDK problem on Ubuntu System

Recently I used Ubuntu system. Sometimes, my jboss and openjdk get this error:
#

# A fatal error has been detected by the Java Runtime Environment:

#

#  SIGSEGV (0xb) at pc=0xb4d657e3, pid=2992, tid=2124122992

#

# JRE version: 6.0_20-b20

# Java VM: OpenJDK Server VM (19.0-b09 mixed mode linux-x86 )

# Derivative: IcedTea6 1.9.7

# Distribution: Ubuntu 10.10, package 6b20-1.9.7-0ubuntu1

# Problematic frame:

# J  org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement()Z

#

# An error report file with more information is saved as:

# /home/luohua/tools/jboss/bin/hs_err_pid2992.log

#

# If you would like to submit a bug report, please include

# instructions how to reproduce the bug and visit:

#   https://bugs.launchpad.net/ubuntu/+source/openjdk-6/

#

I read the hs_err_pid2992.log file. It does not make any sence to me. So I try to use sun jdk instead of open jdk to have a try.

I tried to get the software with command
>sudo apt-get install sun-java6-jdk
But I get these error message:

[sudo] password for luohua:
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'sun-java6-jdk' has no installation candidate

I tried to solve this with command:
>sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
>sudo apt-get update

again
>sudo apt-get install sun-java6-jdk

change the JDK
>sudo update-alternatives --config java
>sudo update-alternatives --config javac

check the version with command:
> java -version

java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Server VM (build 19.1-b02, mixed mode)

So, I hope it will work fine in the future.

Open my eclipse and click
[Preferences]---->[Java]----->[Installed JREs]------>[Add] /usr/lib/jvm/java-6-sun

猜你喜欢

转载自sillycat.iteye.com/blog/965534