Unable to start Eclipse -- can't open \Java\jre6\lib\i386\jvm.cfg

Viewed 64276
could not open C:\Program Files\Java\jre6\lib\i386\jvm.cfg

is the error coming when i am trying to start eclipse ide.

my C:\Program Files has

jdk1.6.0_14
jdk1.6.0_17
jre6

folders.

path is set to

PATH: C:\Program Files\Java\jdk1.6.0_17\bin

what is the problem

i have seen this link but it is not solving my problem can't find JRE in the JDK

12 Answers

I recently got the same problem on my Windows 7. The issue was that two different paths were specified for Java in the path environment variable. This can be checked as follows.

On the command prompt, run the following command:

> where java

C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe <br/>
C:\Program Files\Java\jdk1.8.0_192\bin\java.exe

The first one was the cause of the issue and removed it from the path. Eclipse is working now without re-installation.

Note: The environment vars have been as follows always:

  1. JAVA_HOME=C:\Program Files\Java\jdk1.8.0_192
  2. JRE_HOME=C:\ProgramFiles\Java\jdk1.8.0_192\jre

This problem mainly occurs when we install new jre or jre gets updated automatically since jdk version and jre version are different and path variable i.e. JAVA_HOME contains jdk path with version included in it . Eclipse might be using that to generate the jre path name for the said file.

I did workaround i.e. changed name of jre folder to the older version e.g. jre1.8.0_191 is after installing update and jre1.8.0_60 was before update. I renamed jre1.8.0_191 with jre1.8.0_60 to solve the issue

I had faced similar problem. Environment variable path problem

JAVA_HOME=C:\Program Files\Java\jdk1.8.0_192

Set the Environment variable after going

Control Panel\All Control Panel Items\System and select Advanced System Settings then set Environment Variables

In System Variables add a new variable JAVA_HOME and variable value = C:\Program Files\Java\jdk1.8.0_192, the path of the jdk file in your system.

and %JAVA_HOME%\bin in the path of the system variables.

Hopefully the problem will solve. After doing this It works fine for me.

Related