有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java Eclipse将不会在我的Windows 7系统上启动,JRE未找到错误

当我启动eclipse时,立即出现以下错误:

A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations: C:\Program Files\eclipse\jre\bin\javaw.exe javaw.exe in your current PATH

它似乎无法读取ini文件或实际的java Path系统变量

根据我在web上读到的内容,我创建了一个eclipse。包含以下内容的ini文件:

-vm
c:\program files\java\jre7\bin\javaw.exe

这是为了避免在小路上乱搞

我运行的是Windows7,sp1

任何想法和意见都将不胜感激

问候,

史蒂夫·奥沙利文


共 (3) 个答案

  1. # 1 楼答案

    尝试将路径放在引号之间,如"c:\program files\java\jre7\bin\javaw"

  2. # 2 楼答案

    创建一个环境变量PATH,其值作为ur jdkbin文件夹的路径

  3. # 3 楼答案

    虽然PATH变量确实有效,但最佳实践是将其放在eclipse中。ini,因为这将允许您快速更改正在使用的JRE。也就是说,在eclipse中,在位置和语法方面存在一些奇怪的问题。伊尼

     - The -vm option and its value (the path) must be on separate lines.
     - The value must be the full absolute 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.
    

    希望这有帮助