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

Sos*_*van 3 java eclipse

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

必须提供Java运行时环境(JRE)或Java Development Kit(JDK)才能运行Eclipse.搜索以下位置后未找到Java虚拟机:当前PATH中的C:\ Program Files\eclipse\jre\bin\javaw.exe javaw.exe

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

按照我在网上阅读的内容,我创建了一个带有以下内容的eclipse.ini文件:

-vm
c:\program files\java\jre7\bin\javaw.exe
Run Code Online (Sandbox Code Playgroud)

这应该可以避免在PATH中出现问题.

我在Windows 7上运行,sp1.

任何想法和意见表示赞赏!

问候,

史蒂夫奥沙利文

son*_*mas 9

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


Jim*_*imP 5

虽然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.
Run Code Online (Sandbox Code Playgroud)

希望这可以帮助.