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

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

问题描述

我在Windows 7上下载了最新的Eclipse。当我点击eclipse图标时,会抛出以下异常:





我已经安装了JRE和JDK。



更新:Eclipse.ini内容:

  -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文件(x86) \Java\jre7\bin


解决方案

根据Eclipse文档中,您可能需要在虚拟机引用之前指定之前的VM ,并且路径不应与-vm开关在同一行上。



  • -vm选项及其值(路径)必须是单独的行。

  • 该值必须是Java可执行文件的完全绝对路径或相对路径,而不仅仅是Java主目录。

  • -vm选项必须位于-vmargs选项之前,因为-vmargs之后的所有内容都将直接传递到JVM。


来源:Eclipse Wiki例如:

  -vm 
C:\Java\JDK\1.6\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion = 1.5
-Xms40m
-Xmx1024m

您还可能需要围绕路径与一些引号,因为它包含空格。始终在根目录下安装不带空格的Eclipse和Java,而不是在 Program Files 之下,以避免此问题。


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

I have already installed JRE and JDK.

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)\Java\jre7\bin

解决方案

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:

  • The -vm option and its value (the path) must be on separate lines.
  • The value must be the full absolute or relative path to the Java executable, not just to the Java home directory.
  • The -vm option must occur before the -vmargs option, since everything after -vmargs is passed directly to the JVM.

Source: Eclipse Wiki

For example:

-vm
C:\Java\JDK\1.6\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx1024m

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上运行Eclipse没有找到JRE和JDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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