简体   繁体   English

Eclipse将无法在我的Windows 7系统上启动,未找到JRE错误

[英]Eclipse will not launch on my Windows 7 system, JRE not found error

When I launch eclipse, i immediately get the following error: 当我启动eclipse时,我立即收到以下错误:

A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. 必须提供Java运行时环境(JRE)或Java Development Kit(JDK)才能运行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 搜索以下位置后未找到Java虚拟机:当前PATH中的C:\\ Program Files \\ eclipse \\ jre \\ bin \\ javaw.exe javaw.exe

It appears that it can't read the ini file, or the actual java Path System variable. 它似乎无法读取ini文件或实际的java Path System变量。

Following something that I have read on the web, I have created an eclipse.ini file with the following contents: 按照我在网上阅读的内容,我创建了一个带有以下内容的eclipse.ini文件:

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

This was supposed to obviate mucking about in the PATH. 这应该可以避免在PATH中出现问题。

I am running on Windows 7, sp1. 我在Windows 7上运行,sp1。

Any thoughts and comments are appreciated! 任何想法和意见表示赞赏!

Regards, 问候,

Steve O'Sullivan 史蒂夫奥沙利文

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

While the PATH variable does work, best practice is to put it in eclipse.ini because that will allow you to quickly change what JRE you are working with. 虽然PATH变量确实有效,但最佳做法是将其放在eclipse.ini中,因为这样可以快速更改您正在使用的JRE。 That being said, there are some quirky issues as far as placement and syntax when it comes to eclipse.ini. 话虽如此,就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.

Hope this helps. 希望这可以帮助。

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

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

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