Your version of Eclipse is 64-bit, based on the paths and filenames.
(您的Eclipse版本是64位,基于路径和文件名。)
However, the version of Java that it's picking up is 32-bit, as indicated by where it is coming from, on this line: (但是,它所提取的Java版本是32位,如其来源所示,在此行上:)
-vm C:Program Files (x86)Javajre7injavaw.exe
Program Files (x86)
is the folder where 64-bit Windows places 32-bit programs.
(Program Files (x86)
是64位Windows放置32位程序的文件夹。)
Program Files
is the folder where 64-bit Windows places 64-bit programs.
(Program Files
是64位Windows放置64位程序的文件夹。)
This can happen when a system has more than one JVM installed, as is often the case on Windows 64-bit (for example, the JRE download page uses the bit-ness of the browser to determine what bit-ness download to offer you, and many people use(d) 32-bit browsers even though they run 64-bit Windows).
(当系统安装了多个JVM时(例如Windows 64位),这种情况就会发生(例如,JRE下载页面使用浏览器的位来确定为您提供哪种位下载,并且许多人使用(d)32位浏览器,即使它们运行的??是64位Windows)。)
The best way to fix this, assuming you do in fact have 64-bit JRE or JDK on your system, is to specify in eclipse.ini
exactly which JVM you want it to use.
(假设您实际上在系统上确实有64位JRE或JDK,则解决此问题的最佳方法是在eclipse.ini
准确指定要使用的JVM。)
The instructions are detailed in the Eclipse wiki page , but basically you have to specify the -vm
option in the ini file - make sure to read the wiki page carefully as the format is very specific. (Eclipse Wiki页面上有详细的说明,但是基本上,您必须在ini文件中指定-vm
选项-请确保仔细阅读Wiki页面,因为格式非常具体。)
Specifying the JVM path in eclipse.ini
is strongly recommended because doing so isolates Eclipse from any potential changes to your system PATH
that some program installers might make (I'm talking to you, Oracle!).
(强烈建议在eclipse.ini
指定JVM路径,因为这样做可以将Eclipse与某些程序安装程序可能对您的系统PATH
所做的任何潜在更改隔离开来(我正在与您交谈,Oracle!)。)
Another option would be to download and use 32-bit Eclipse instead of 64-bit, but it's still strongly recommended to specify the path to the JVM in eclipse.ini
.
(另一种选择是下载并使用32位Eclipse而不是64位,但是仍然强烈建议在eclipse.ini
指定JVM的路径。)
Left for historical reference :
(留作历史参考 :)
To check your version of Java, run
(要检查您的Java版本,请运行)
java -version
in a console (command prompt).
(在控制台中(命令提示符)。)
On Windows 7 with 64-bit Java 6 I get: (在具有64位Java 6的Windows 7上,我得到:)
java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)
Note the 3rd line, which shows that this is a 64-bit version.
(请注意第三行,它显示这是一个64位版本。)
On a 32-bit version you'll get something like:
(在32位版本上,您将获得以下内容:)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)