64位系统下同时使用64位和32位的eclipse
The -vm option and its value (the path) must be on separate lines.
The value must be the full absolute or relative path to the Java executable, not just to the Java home directory.
The -vm option must occur before the -vmargs option, since everything after -vmargs is passed directly to the JVM.
For the 32-bit Eclipse executable (eclipse.exe on Windows) a 32-bit JVM must be used and
for the 64-bit Eclipse executable a 64-bit JVM must be used.
32-bit Eclipse will not work with a 64-bit JVM.
要所有的软件,硬件,全是64位的,你的应用才算成功的运行在64位上了。比如:
使用64位的CPU,现在(2006年以后生产)的CPU都是64位。
安装64位的操作系统,比如64位的windows 7
安装64位的JDK,比如jdk-6u25-windows-x64.exe
安装64位的eclipse,比如eclipse-jee-helios-SR2-win32-x86_64.zip
http://blog.csdn.net/jacarri/article/details/9785683
32位JDK安装目录是D:\Java\32\jdk1.6.0_13
64位JDK安装目录是D:\Java\jdk1.7.0_06
JAVA_HOME配置的是JAVA_HOME=D:\Java\32\jdk1.6.0_13
然后启动64位的eclipse果断的报错了,报错信息:
[Failed to load the JNI shared library "D:\Java\32\jdk1.6.0_13\bin\..\jre\bin\client\jvm.dll".],
想到环境变量配置的是32位的JDK,果断的确认是eclipse使用了默认的配置,要解决这个问题就要在64位eclipse.ini中指定jvm的位置.
配置方法如下:
在eclipse.ini文件中找到openFile,在下面添加如下两行:
-vm
D:/Java/jdk1..0_06/bin/javaw.exe
注意上面两行不能写在同一行上哟.
为了保证以后将环境变量的jdk切换到64位后,32位的eclipse报错,所以顺便32位的eclipse的配置文件也做了类似的配置
如果改配置后出现这个错误[Java was started but returned exit code=13] ,可能是你给64位的eclipse指定了32位的jvm.
上我64位eclipse使用的配置文件
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
D:/Java/jdk1.7.0_06/bin/javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx384m
-XX:PermSize=256M
-XX:MaxPermSize=256M
-verbose:gc
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-Xloggc:D:/application/eclipse-android/gc.log
上32位eclipse使用的配置文件
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vm
D:/Java/32/jdk1.6.0_13/bin/javaw.exe
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
http://blog.csdn.net/wangxianshou/article/details/7409293
实际上,JDK环境配置好之后,选择一个适合操作系统的Eclipse版本,启动Eclipse就能根据
环境变量自动寻找JDK,并成功运行。
下面是我的弯路历程,总结一下,希望别人可以少走弯路。
我安装前手头的环境
=========================================================================
操作系统 win7 64bit
JDK:jdk-7u3-windows-i586
http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u3-download-1501626.html
Eclipse:eclipse-SDK-4.1-win32-x86_64
http://www.eclipse.org/downloads/
=========================================================================
先把jdk安装上,然后设置好java环境后,test没有问题
然后把Eclipse解压开,然后进入Eclipse目录中双击 eclipse 时
启动不开,报 Failed to load the JNI shared library jvm.dll 错误。
网上查阅 http://www.oschina.net/question/12_26790
指点 换成 64位的jdk,就能解决
于是乎,下载64位jdk jdk-7u3-windows-x64
安装好后,仍然报这个错误,
接下来把之前安装的32位的java环境删掉(开始,控制面板,卸载程序,32位java环境相关软件)
再启动Eclipse,终于正常了。
How to reconfigure eclipse to use a 64 bit JVM
I'm using eclipse on what I thought were all 64 bit runtime environments.
The current settings Java>installed JREs and Execution Environment all point to jdk1.6.0_30 which is a 64 bit version of the JDK.
However, eclipse still thinks it's running a 32 bit version because when I run:
System.getProperty("sun.arch.data.model");
it returns 32 instead of 64.
And the external JNI resource that I compiled for 64 bit machines will not link to the shared .so file unless it's running in a 64 bit enviroment. (I'm getting word size mismatch errors when I try to do this)
So How can I reconfigure eclipse to run 64 bit jvm. Does eclipse itself have to be a 64 bit version?
:on linux
Edit: I have tried everyone's suggestions and nothing is working. I've changed the execution, and enviroment variables to point to the newst JDK I have which is 1.6_30. when I run the program from a command line I get 64 and amd64 as the value when I run the same program in eclise I get 32 and i386. Something is wrong in eclipse that is causing it to try and run it on a 32 bit JVM. when I try java -d32 -version it says that a 32 bit enviroment isn't installed but Eclipse doesn't know that. I've modified the Eclipse.ini file and still nothing is working. I've restarted eclipse after these changes...nothing. Can some one who knows eclipse well people help me out here. thanks
Add the -vm tag to eclipse.ini or the shortcut to explicitly specify a JRE. Note that the default for Windows XP is to use the CRAPPY JRE that comes with Windows.
-vm "%JAVA_HOME%/bin/javaw.exe"
Note
that the format in eclipse.ini is to have -vm on one line and the value on the next.. I'm not sure why...
-Xmx8g
-d64
The "installed JREs" (better use JDKs) are used for building and running your code
and can be of different architecture or Java version.
The JVM used for running Eclipse is defined in the eclipse.ini file.
You should use the version for the architecture of the JVM.
Okay.
This has been rather headache inducing, but I believe I have a solution.
After changing the eclipse.ini, Go to your project properties.
Under the Run/Debug settings, edit the launch configuration for your project.
Under the JRE tag, click installed JREs.
When that dialog comes up, click search.
Go to your program files folder, NOT the x86 one, and let it search for your JREs.
When the latest comes up, deselect the JRE that was currently selected and select the most recent JRE that it found.
I renamed mine JRE7-64 just so I could identify a difference. This solved the issue on my end. Good luck
64位系统下同时使用64位和32位的eclipse的更多相关文章
- 64位系统下找不到office 32位组件
如果系统式64位的,而装的是32位的office软件,在运行栏中输入命令:dcomcnfg,打开组件服务管理窗口,但是却发现找不到Microsoft Excel程序, 这主要是64位系统的问题,exc ...
- 外网win10 64位环境下 为内网win7 32位安装三方包的最靠谱手段:python64位、32位全安装。
经过一周的各种折磨,如题.以下是我的经验和教训. 我的外网是win10 64位,内网环境win7 32位.由于未知原因,anaconda无法安装!!! 其实最靠谱的安装三方包的还是whl包.但是很有可 ...
- 无光驱在32位windows系统下安装64位windows系统
位的系统. 大家都知道,32位的操作系统最多只能支持3.2G的内存,现在内存白菜价,很多人都在原有基础上购入新内存,这样最少也有4G了,为了让内存不浪费,我 们只有升级到64位操作系统.但是很多朋友又 ...
- (原)解决.NET 32位程序运行在64位操作系统下的兼容性问题
背景:一个第三方组件是C++.NET 32位开发的,后被C#(基于FrameWork4.0)调用并封装成组件,此二次封装的组件无法运行于64位操作系统上. 开发环境:VS2012:解决 ...
- 64位系统下注册32位dll文件
64位系统下注册32位dll文件 在64位系统里注册32位软件所需的一些dll会提示不兼容,大概因为32 位进程不能加载64位Dll,64位进程也不可以加载32的导致. 若要支持的32 位和64 位C ...
- PL/SQL Developer 在windows7 64位系统下连Oaracle11g64位系统的解决经验
PL/SQL Developer 在windows7 64位系统下连Oaracle11g64位系统的解决经验 一.问题现象及解决方法 现象: 1.PL/SQL 无法登录64位数据库 2.在PL/SQL ...
- 64位系统下System32文件系统重定向
前言 因为一次偶然的机会,需要访问系统目录“C:/Windows/System32“文件夹下的内容,使用的测试机器上预装了win7 64系统.在程序运行中竟然发生了该文件路径不存在的问题!!通过查看网 ...
- 64位系统/32位系统下/8位CPU的数据宽度
不同的编译器根据不同的 64 位模型有所不同. 比如 Visual C++,从第一个支持 64 位的版本起,一直就是使用 LLP64 内存模型,也就是说,编译出的代码除了 long 和指针是 64 位 ...
- Installshield 64位操作系统下拷贝文件,如何重定向到32位的系统文件夹下
原文:Installshield 64位操作系统下拷贝文件,如何重定向到32位的系统文件夹下 64位操作系统下拷贝文件重定向问题,在在复制代码前加上Disable(WOW64FSREDIRECTION ...
随机推荐
- rocketmq 记
Rocketmq选型 Rocket是一个专业的队列服务,性能优于Rabbitmq,优势是性能和并发,源于Kafka的扩展版,增强了数据的可靠性. Rocketmq的队列类型 普通队列,广播队列.顺序队 ...
- Sklearn-GridSearchCV网格搜索
GridSearchCV,它存在的意义就是自动调参,只要把参数输进去,就能给出最优化的结果和参数.但是这个方法适合于小数据集,一旦数据的量级上去了,很难得出结果.这个时候就是需要动脑筋了.数据量比较大 ...
- 查找内容grep命令
标准unix/linux下的grep通过以下参数控制上下文 grep -C 5 foo file 显示file文件中匹配foo字串那行以及上下5行 grep -B 5 foo file 显示foo及前 ...
- “全排列”问题系列(一)[LeetCode] - 用交换元素法生成全排列及其应用,例题: Permutations I 和 II, N-Queens I 和 II,数独问题
转:http://www.cnblogs.com/felixfang/p/3705754.html 一.开篇 Permutation,排列问题.这篇博文以几道LeetCode的题目和引用剑指offer ...
- CentOS7中开机出现end_request:I/O error,dev fd0,sector 0的解决办法
https://blog.csdn.net/wangjinyang_123/article/details/40583635
- selector函数指针回调机制
selector可以叫做选择器,其实指的就是对象的方法,也可以理解为C语言里面的函数指针,在面向对象里面的对应概念. [self performSelector:@selector(Hidden) w ...
- Canvas进阶——制作小游戏【贪吃蛇】
今天呢,主要和小伙伴们分享一下一个贪吃蛇游戏从构思到实现的过程~因为我不是很喜欢直接PO代码,所以只copy代码的童鞋们请出门左转不谢. 按理说canvas与其应用是老生常谈了,可我在准备阶段却搜索不 ...
- logstash通过redis收集日志
(1)部署redis 1丶安装redis yum install epel-release -y yum install redis -y 2丶修改配置文件 #vim /etc/redis.conf ...
- 11.Spark Streaming源码解读之Driver中的ReceiverTracker架构设计以及具体实现彻底研究
上篇文章详细解析了Receiver不断接收数据的过程,在Receiver接收数据的过程中会将数据的元信息发送给ReceiverTracker: 本文将详细解析ReceiverTracker的的架构 ...
- thinkphp5.0安装
ThinkPHP5的环境要求如下: PHP >= 5.4.0 PDO PHP Extension MBstring PHP Extension CURL PHP Extension 严格来说,T ...