简体   繁体   English

运行Eclipse:即使两者都是64位,也找不到Java

[英]Running Eclipse: can't find Java even though both are 64 bit

I downloaded 64-bit Java from Oracle and 64-bit Eclipse and when I run eclipse it gives me error code 13 . 我从Oracle和64位Eclipse下载了64位Java,运行eclipse时出现错误代码13 I tried using the solutions from another user who asked this question but it didn't work. 我尝试使用另一个提出这个问题的用户的解决方案,但没有成功。 Any suggestions? 有什么建议么?

@Andreas hit the nail on the head with his suggested duplicate. @安德里亚斯(Andreas)与他建议的副本一道被钉在了头上。 The problem is that you are trying to run a 64-bit eclipse with a 32-bit java, or vice versa. 问题是您尝试使用32位Java运行64位Eclipse,反之亦然。 Yes, I know you downloaded 64-bit eclipse and 64-bit java, but you didn't tell the 64-bit eclipse to use the 64-bit java. 是的,我知道您下载了64位Eclipse和64位Java,但是您没有告诉64位Eclipse使用64位Java。 The eclipse.ini file is where you do that, and the -vm option is how. eclipse.ini文件是执行此操作的位置,-vm选项是执行操作的位置。

In addition to the linked question, Eclipse provides a forum post on this subject at https://www.eclipse.org/forums/index.php/t/198527/ and a guide to using the eclipse.ini file at http://wiki.eclipse.org/Eclipse.ini . 除链接的问题外,Eclipse在https://www.eclipse.org/forums/index.php/t/198527/上提供了有关此主题的论坛帖子,并在http://上提供了使用eclipse.ini文件的指南。 /wiki.eclipse.org/Eclipse.ini

The bottom line: you set the -vm option in the eclipse.ini file. 最重要的是:您在eclipse.ini文件中设置了-vm选项。 The -vm must be on its own line, and the following line must only be the path to your javaw.exe. -vm必须位于其自己的行上,并且以下行必须仅是javaw.exe的路径。 Both of those lines have to come before any -vmargs entry. 这两行都必须任何-vmargs条目之前

Once you get that done your 64-bit eclipse will run with the 64-bit java that you downloaded. 完成后,您的64位Eclipse将与您下载的64位Java一起运行。

将vm选项和完整路径添加到javaw.exe
-vm C:\\Program Files\\Java\\jre6\\bin\\javaw.exe -startup

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM