【问题标题】:Eclipse will not launch on my Windows 7 system, JRE not found errorEclipse 无法在我的 Windows 7 系统上启动,找不到 JRE 错误
【发布时间】:2012-01-11 17:51:12
【问题描述】:

当我启动 eclipse 时,我立即收到以下错误:

Java 运行时环境 (JRE) 或 Java 开发工具包 (JDK) 必须 可用于运行 Eclipse。没有 Java 虚拟机 搜索以下位置后找到:C:\Program 文件\eclipse\jre\bin\javaw.exe 当前 PATH 中的 javaw.exe

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

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

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

这应该避免在 PATH 中胡闹。

我在 Windows 7 sp1 上运行。

感谢任何想法和cmets!

问候,

史蒂夫·奥沙利文

【问题讨论】:

    标签: java eclipse


    【解决方案1】:

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

    【讨论】:

    • 宾果游戏!谢谢。微软新员工,正在从 Macintosh 过渡到 Windows(再次......)
    【解决方案2】:

    虽然 PATH 变量确实有效,但最佳做法是将它放在 eclipse.ini 中,因为这样可以让您快速更改正在使用的 JRE。话虽如此,就 eclipse.ini 的位置和语法而言,存在一些奇怪的问题。

     - 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.
    

    希望这会有所帮助。

    【讨论】:

      【解决方案3】:

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

      【讨论】:

        猜你喜欢
        • 2016-07-03
        • 2013-02-07
        • 2013-11-16
        • 1970-01-01
        • 2021-09-24
        • 2012-09-02
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多