安装Oracle JDK 7.0与8.0 for Mac OS X后Eclipse启动报错的解决之道

启动 Eclipse 时,直接报错
The JVM shared library "/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/../jre/lib/server/libjvm.dylib"
does not contain the JNI_CreateJavaVM symbol.

Unable to find any JVMs matching architecture "i386".
eclipse[526:14077] Error loading /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/MacOS/libjli.dylib:  dlopen(/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/MacOS/libjli.dylib, 265): no suitable image found.  Did find:
        /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/MacOS/libjli.dylib: mach-o, but wrong architecture

既然报 wrong architecture 错,就看看这两个文件究竟是什么状况:

通过运行 lipo -info /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/../jre/lib/server/libjvm.dylib
Architectures in the fat file: /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/../jre/lib/server/libjvm.dylib are: x86_64

以及 lipo -info /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/MacOS/libjli.dylib
Non-fat file: /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/MacOS/libjli.dylib is architecture: x86_64

清楚地显示 architecture: x86_64,于是乎,真正的根源找到了,是由于Eclipse是32位的,而Oracle JDK 7.0与8.0均为64位的,解决的问题非常easy,下载Eclipse 64位For Mac OS X就可以。
由于 /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java -d32 -version 运行的结果为:
Error: This Java instance does not support a 32-bit JVM.
Please install the desired version.

參考 https://bugs.eclipse.org/bugs/show_bug.cgi?id=411361 之类的解决方法均是徒劳无功的,换 64 位版本号的 Eclipse 才是正道。

时间: 2024-10-25 22:19:07

安装Oracle JDK 7.0与8.0 for Mac OS X后Eclipse启动报错的解决之道的相关文章

Linux安装ElasticSearch启动报错的解决方法

Linux安装ElasticSearch后,ElasticSearch是不能用root用户启动的,以root用户启动会报错Refer to the log for complete error details,出现这种情况该如何解决呢?下面小编就为大家带来Linux安装ElasticSearch启动报错的解决方法,一起去看看吧 今天就出现的异常问题专门解决一下.你安装好ElasticSearch以后,在启动的时候需要注意的问题是,ElasticSearch是不能用root用户启动的(这是根据el

Oracle启动报错ORA-03113解决

环境:RHEL6.4 + Oracle 11.2.0.4 步骤摘要:1.启动报错ORA-031132.查看alert日志查找原因3.根据实际情况采取合理的措施,这里我们先增加闪回区大小,把库启动起来4.制定对应的归档日志删除策略 1.启动报错ORA-03113 $ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on 星期六 2月 28 13:56:44 2015 Copyright (c) 1982, 2013, Orac

eclipse启动报错A Java RunTime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse.

Eclipse启动时报错:A Java RunTime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No java virtual machine was found after searching the following locations:… 此问题起于我在Ubuntu1004上装了两个版本的eclipse:Galieo+helios:卸载前者后出现启

升级Zabbix proxy到3.0.2后无法启动报错

一 问题描述 将一台zabbix proxy由2.4.5升级到3.0.2后启动了就直接崩溃了. 错误信息如下: 2367:20160508:153246.830 One child process died (PID:42385,exitcode/signal:11). Exiting ... 42367:20160508:153248.904 Zabbix Proxy stopped. Zabbix 3.0.2 (revision 59540). 将日志级别调高点,设置DebugLevel=4

Oracle数据库监听器启动报错:1067解决

1.原因:本地ip或主机名在安装oracle后已经更改,需改回. 2.打开oracle安装目录(开始中搜索oracle,查找文件所在位置). 3.进入$\NETWORK\ADMIN\修改listener.ora和tnsnames.ora中对应本地的ip(临时推荐)或者主机名即可. 原文地址:https://www.cnblogs.com/wuyanlin/p/8337026.html

linux下weblogic11g成功安装后,启动报错Getting boot identity from user

<2015-7-1 下午05时46分33秒 CST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.6.0  Tue Nov 15 08:52:36 PST 2011 1441050 > <2015-7-1 下午05时46分39秒 CST> <Info> <Security> <BEA-090065> <Gett

linux下weblogic11g安装成功后,启动报错Getting boot identity from user

<2015-7-1 下午05时46分33秒 CST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.6.0  Tue Nov 15 08:52:36 PST 2011 1441050 > <2015-7-1 下午05时46分39秒 CST> <Info> <Security> <BEA-090065> <Gett

eclipse 启动报错,A Java RunTime Environment (JRE) or Java Development Kit (JDK) must

A Java RunTime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No java virtual machine was found after searching the following locations:D:\Program   Files\eclipse\jre\bin\javaw.exe javaw.exe 加了环境变量也不行 错误就出在

Ubuntu Linux下安装Oracle JDK

Ubuntu Linux下安装Oracle JDK Dennis Hu 2014-4-22 说明:因为非常多系统不支持使用OpenJDK,因此在ubuntu下会须要安装Oracle JDK.而Oracle JDK的安装貌似没有提供apt方式,因此安装Oracle JDK的方式相对麻烦一些,我常常安装,为了方便别人同一时候方便自己查看,把它记下来. 第一步:区分32位还是64位操作系统 先确定你的ubuntu linux是32位还是64位的,方法非常多,这里介绍一种就可以. $uname -a 第