在Mac上安装Java(xerces)的问题 [英] problems with java installation (xerces) on mac
问题描述
我正在使用MacOsX 10.6.4.
I'm using MacOsX 10.6.4.
前段时间,我遇到了Eclipse问题(它不再启动-我打开了问题,然后按照所有建议进行操作,但没有运气). 然后,我也遇到了其他Java应用程序的非常相似的问题,其中最后一个是android sdk.所有这些问题似乎与xerces/xml有关,如以下异常所示(仅运行tools/android并单击可用更新"按钮):
Some time ago I run into problems with Eclipse (it wouldn't start anymore - I opened a question here and followed all the suggestion but with no luck). Then I also run into very similar problems with other java applications, of which the last one is the android sdk. All these problems seem to be related with xerces/xml, as the following exception shows (just running tools/android and clicking on the "available updates" button):
线程正在加载源代码"中的异常java.lang.AbstractMethodError:org.apache.xerces.dom.DeferredElementNSImpl.getTextContent()Ljava/lang/String;
Exception in thread "Loading Source" java.lang.AbstractMethodError: org.apache.xerces.dom.DeferredElementNSImpl.getTextContent()Ljava/lang/String;
有什么方法可以修复Java安装(重新安装操作系统是不可能的)吗?
Is there any way to repair the java installation (reinstalling the OS is out of the question)?
非常感谢
尼古拉·蒙泰基奥(Nicola Montecchio)
Nicola Montecchio
推荐答案
可尝试的一些方法:
-
寻找偶然的
xerces
JAR,这些JAR可能无意中留在了System
属性java.ext.dirs
的目录之一中.
Look for adventitious
xerces
JARs that may have been inadvertently left in one of the directories of theSystem
propertyjava.ext.dirs
.
/Users/*/Library/Java/Extensions
/Library/Java/Extensions
/System/Library/Java/Extensions
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext
使用聚光灯在Eclipse之外搜索无关的xerces
JAR.
Use spotlight to search for extraneous xerces
JARs outside of Eclipse.
删除/Applications/eclipse
和~/.eclipse
;重新安装Eclipse.
Remove /Applications/eclipse
and ~/.eclipse
; reinstall Eclipse.
从安装程序DVD中重新安装Java:/Volumes/Mac OS X Install DVD/Optional Installs/Xcode Tools/Packages/JavaSDK.pkg
.
Reinstall Java from the the installer DVD: /Volumes/Mac OS X Install DVD/Optional Installs/Xcode Tools/Packages/JavaSDK.pkg
.
检查软件更新.
这篇关于在Mac上安装Java(xerces)的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!