找不到在 Windows 7 JRE 和 JDK 上运行 Eclipse [英] Running Eclipse on Windows 7 JRE and JDK not found

查看:25
本文介绍了找不到在 Windows 7 JRE 和 JDK 上运行 Eclipse的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Windows 7 上下载了最新的 Eclipse.当我单击 Eclipse 图标时,它会引发以下异常:

I downloaded the latest Eclipse on Windows 7. When I click the eclipse icon it throws the following exception:

我已经安装了 JRE 和 JDK.

I have already installed JRE and JDK.

更新:Eclipse.ini 内容:

UPDATE: Eclipse.ini contents:

   -startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120913-144807
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms40m
-Xmx512m
-vm C:Program Files (x86)Javajre7in

推荐答案

根据 Eclipse 文档,您可能需要在 VM args 之前指定 VM,并且路径不应与 -vm 开关在同一行:

According to the Eclipse documentation, you may need to specify the VM before the VM args, and the path should not be on the same line as the -vm switch:

  • -vm 选项及其值(路径)必须位于不同的行中.
  • 该值必须是 Java 可执行文件的完整绝对或相对路径,而不仅仅是 Java 主目录.
  • -vm 选项必须出现在 -vmargs 选项之前,因为 -vmargs 之后的所有内容都直接传递给 JVM.

来源:Eclipse Wiki

例如:

-vm
C:JavaJDK1.6injavaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx1024m

您可能还需要用一些引号括住您的路径,因为它包含空格.我总是将 Eclipse 和 Java 之类的东西安装在没有空格的根目录中,而不是在 Program Files 下,以避免这个问题.

You also might need to surround your path with some quotes, since it contains spaces. I always install things like Eclipse and Java in root directories with no spaces, not under Program Files, to avoid this problem.

这篇关于找不到在 Windows 7 JRE 和 JDK 上运行 Eclipse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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