我有以下系统:
$ cat /etc/redhat-release
Scientific Linux release 6.1 (Carbon)
$ uname -a
Linux wcmisdlin02.uftmasterad.org 2.6.32-279.9.1.el6.x86_64 #1 SMP Tue Sep 25 14:55:44 CDT 2012 x86_64 x86_64 x86_64 GNU/Linux
$
我有以下套餐
$ rpm -qa | grep ^eclipse
eclipse-emf-2.6.0-1.el6.x86_64
eclipse-svnkit-1.3.0-3.el6.x86_64
eclipse-swt-3.6.1-6.13.el6.x86_64
eclipse-rcp-3.6.1-6.13.el6.x86_64
eclipse-rse-3.2-1.el6.x86_64
eclipse-jdt-3.6.1-6.13.el6.x86_64
eclipse-pde-3.6.1-6.13.el6.x86_64
eclipse-platform-3.6.1-6.13.el6.x86_64
eclipse-subclipse-1.6.5-6.el6.x86_64
$
每当我尝试通过Eclipse安装PDT时,我都会遇到以下错误:
An error occurred while collecting items to be installed
session context was:(profile=PlatformProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Comparison method violates its general contract!
Comparison method violates its general contract!
*更新*
$ rpm -qa | grep ^java
java-1.6.0-openjdk-javadoc-1.6.0.0-1.49.1.11.4.el6_3.x86_64
java-1.6.0-openjdk-1.6.0.0-1.49.1.11.4.el6_3.x86_64
java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64
java-1.6.0-openjdk-devel-1.6.0.0-1.49.1.11.4.el6_3.x86_64
java_cup-0.10k-5.el6.x86_64
java-1.7.0-openjdk-1.7.0.5-2.2.1.el6_3.3.x86_64
$
我也发现了这个:
$ sudo grep java-1.7.0 /var/log/yum.log
Sep 21 12:46:33 Installed: 1:java-1.7.0-openjdk-1.7.0.5-2.2.1.el6_3.3.x86_64
$
答案 0 :(得分:2)
这可能是我几个月前遇到的known Eclipse bug。该问题与JDK 7中Arrays.sort()
的新实现有关。
如果是这个bug,你需要安装一个较新版本的Eclipse,因为这个bug会阻止你更新(从Eclipse中)。
或者,您可以尝试使用系统属性java.util.Arrays.useLegacyMergeSort=true
启动Eclipse,然后更新Eclipse平台。