3
votes

When I launch eclipse, i immediately get the following error:

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

It appears that it can't read the ini file, or the actual java Path System variable.

Following something that I have read on the web, I have created an eclipse.ini file with the following contents:

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

This was supposed to obviate mucking about in the PATH.

I am running on Windows 7, sp1.

Any thoughts and comments are appreciated!

Regards,

Steve O'Sullivan

3

3 Answers

9
votes

Create an Environmental Variable PATH with value as path to ur jdkbin folder

5
votes

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. That being said, there are some quirky issues as far as placement and syntax when it comes to 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.

2
votes

try placing the path in between quotations like "c:\program files\java\jre7\bin\javaw"