如何重新配置​​eclipse以使用64位JVM [英] How to reconfigure eclipse to use a 64 bit JVM

查看:123
本文介绍了如何重新配置​​eclipse以使用64位JVM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用eclipse,我以为是所有的64位运行时环境。当前设置Java>安装的JRE和执行环境都指向jdk1.6.0_30,它是64位版本的JDK。然而,eclipse仍然认为它运行一个32位版本,因为当我运行:


System.getProperty(sun.arch.data.model );


它返回32而不是64.



外部JNI资源我为64位机器编译的文件将不会链接到共享的.so文件,除非它运行在64位环境中。 (当我尝试这样做时,我得到字大小不匹配错误)



那么如何重新配置​​eclipse来运行64位jvm。 eclipse本身是否必须是64位版本?



:on linux



编辑:我尝试过所有人的建议,加工。我改变了执行,环境变量指向最新的JDK,我是1.6_30。当我从命令行运行程序时,我得到64和amd64作为值,当我运行相同的程序在eclise我得到32和i386。在eclipse中有一些错误导致它尝试在32位JVM上运行它。当我尝试java -d32 -version它说,一个32位环境没有安装,但Eclipse不知道。我修改了Eclipse.ini文件,还没有任何工作。我已经重新启动了这些更改后的eclipse ...没有。有些人知道日食好人可以帮助我在这里。谢谢

解决方案

将-vm标记添加到eclipse.ini或显式指定JRE的快捷方式。请注意,Windows XP的默认值是使用Windows附带的CRAPPY JRE。



-vm%JAVA_HOME%/ bin / javaw。 exe


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"

这篇关于如何重新配置​​eclipse以使用64位JVM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆