如何重新配置 Eclipse 以使用 64 位 JVM
我在我认为都是 64 位运行时环境中使用 eclipse.当前设置 Java>installed JREs 和 Execution Environment 都指向 jdk1.6.0_30,它是 JDK 的 64 位版本.但是,eclipse 仍然认为它运行的是 32 位版本,因为当我运行时:
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");
System.getProperty("sun.arch.data.model");
它返回 32 而不是 64.
it returns 32 instead of 64.
我为 64 位机器编译的外部 JNI 资源不会链接到共享的 .so 文件,除非它在 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)
那么如何重新配置 eclipse 以运行 64 位 jvm.eclipse 本身是否必须是 64 位版本?
So How can I reconfigure eclipse to run 64 bit jvm. Does eclipse itself have to be a 64 bit version?
:在linux上
我已经尝试了每个人的建议,但没有任何效果.我已更改执行和环境变量以指向我拥有的最新 JDK,即 1.6_30.当我从命令行运行程序时,我得到 64 和 amd64 作为值,当我在 ecrise 中运行相同的程序时,我得到 32 和 i386.eclipse 中的某些问题导致它尝试在 32 位 JVM 上运行它.当我尝试 java -d32 -version 时,它说没有安装 32 位环境,但 Eclipse 不知道.我已经修改了 Eclipse.ini 文件,但仍然没有任何效果.在这些更改之后,我重新启动了 eclipse……什么都没有.一些了解日食的人可以在这里帮助我.谢谢
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
推荐答案
将 -vm 标签添加到 eclipse.ini 或显式指定 JRE 的快捷方式.请注意,Windows XP 的默认设置是使用 Windows 附带的 CRAPPY JRE.
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"
相关文章