Mac 上的 java 安装 (xerces) 问题
我使用的是 MacOsX 10.6.4。
前段时间我遇到了 Eclipse 的问题(它不再启动 - 我打开了一个 问题< /a> 在这里并遵循了所有建议,但没有运气)。 然后我在其他java应用程序中也遇到了非常类似的问题,其中最后一个是android sdk。所有这些问题似乎都与 xerces/xml 有关,如以下异常所示(只需运行 tools/android 并单击“可用更新”按钮):
线程“加载源”java.lang.AbstractMethodError中出现异常:org.apache.xerces.dom.DeferredElementNSImpl.getTextContent()Ljava/lang/String;
有没有办法修复java安装(重装操作系统是不可能的)?
非常感谢
尼古拉·蒙特奇奥
I'm using MacOsX 10.6.4.
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):
Exception in thread "Loading Source" java.lang.AbstractMethodError: org.apache.xerces.dom.DeferredElementNSImpl.getTextContent()Ljava/lang/String;
Is there any way to repair the java installation (reinstalling the OS is out of the question)?
thanks a lot
Nicola Montecchio
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
需要尝试的一些事情:
查找可能无意中留在
System
属性java.ext.dirs 的目录之一中的外来
.xerces
JAR使用聚光灯在 Eclipse 外部搜索无关的
xerces
JAR。删除
/Applications/eclipse
和~/.eclipse
;重新安装 Eclipse。从安装程序 DVD 重新安装 Java:
/Volumes/Mac OS X Install DVD/Optional Installs/Xcode Tools/Packages/JavaSDK.pkg
。检查软件更新。
Some things to try:
Look for adventitious
xerces
JARs that may have been inadvertently left in one of the directories of theSystem
propertyjava.ext.dirs
.Use spotlight to search for extraneous
xerces
JARs outside of Eclipse.Remove
/Applications/eclipse
and~/.eclipse
; reinstall Eclipse.Reinstall Java from the the installer DVD:
/Volumes/Mac OS X Install DVD/Optional Installs/Xcode Tools/Packages/JavaSDK.pkg
.Check Software update.
谢谢 Trashgod,
请给我一个 Huginn。
这不仅解决了我的 Eclipse/Android 问题(与 Nicola 的相同),还解决了 Netbeans 更新程序(从 6.5 到 7.2 的每个版本)无法正常工作的问题。
我发现我的小 xerces 炸弹潜伏在 /User//Library/Java/Extensions 中,里面的所有内容都是 2003/4 的(在我买 Mac 之前。嗯...)。
不管怎样,作为一个谨慎的人,我只是将罪犯重命名为 xerces.jar.old。
那是行不通的。
当我今天询问该任务时,Netbeans 仍然打开着它。
因此,我将整个 Java 文件夹移至 Previous_Java 哦,瞧!
机器运行正常,java 运行(Oracle 的 7,而不是 Apple 和 SDK 的 6.x),Android 运行,Eclipse 运行,Netbeans 启动,没有爆炸或进入死亡螺旋重新启动循环。
给所有遇到此问题的 Netbeans 用户的注释...尝试追踪它可能会令人惊讶地令人沮丧。
规则
蒂姆
Thanks Trashgod,
Have a Huginn on me.
That not only solved my Eclipse/Android issue (Same as Nicola's) but also the failure of the Netbeans updater (Every version from 6.5 to 7.2) to work properly.
I found my little xerces bomb lurking in /User//Library/Java/Extensions and everything in there was from 2003/4 (Before I bought the Mac. Hmm...).
Anyhow, being a cautious type I just renamed the offender to xerces.jar.old.
That doesn't work.
Netbeans still had it open when I interrogated the task today.
So, I moved the entire Java folder to Previous_Java eh voila!
Machine behaves normally, java runs (7 from Oracle not 6.x from Apple and SDK), Android does stuff, Eclipse does stuff, Netbeans starts without bombing or going into a death spiral re-start loop.
A note for any Netbeans users with this problem... It can be amazingly frustrating trying to track it down.
regs
Tim