Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

java

eclipse

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

like image 383
coder25 Avatar asked Jun 23 '11 09:06

coder25


6 Answers

I had similar problem on a Windows machine. I had moved my Java directory from inside "Program Files" (the space in the directory name was giving me trouble) over to c:\

I set all my PATH variables to the new location, restarted the machine and thought that would be enough. Nope

java -- version

Error: could not open `C:\Program Files\Java\jre1.8.0_66\lib\i386\jvm.cfg

This solution came from the good folks over at coderanch

Start regedit (just type "regedit" into the Run program) and work your way down to HKEY_LOCAL_MACHINE > SOFTWARE > JavaSoft

There you will find several different java directories

Java Development Kit

Java Plug-in

Java Runtime Environment

Java Update

Java Web Start

In each directory you'll find different directories for the different version of java (esp. Java Web Start). Open each and every one and you'll see that your old path is still listed. Double click the Name (left column) of the listing and manually type in the new path.

Open a new terminal and type in Java - version and you should be fine.

like image 126
mycowan Avatar answered Oct 14 '22 19:10

mycowan


This problem can show up if you initially install Java in the default location (C:\Program Files) and then later re-install into another location.

The default installation copies java.exe, javaw.exe and javaws.exe to C:\Windows\System32. If you are in this situation and delete these files it will likely solve your issue.

(Thanks to Jay: http://jaykhimani.blogspot.com/2012/09/error-could-not-open-cprogram.html)

like image 37
Lars Avatar answered Oct 14 '22 17:10

Lars


Problem: Eclipse Neon error: "C:\Program Files\Java\jre1.8.0xx.xx\jvm.cfg"

Solution Win7 Pro: System Properties > Enviorment Variables > System Variables > Path > Edit > #make sure the current JAVA directory appears first in the path if more than 1 JAVA directory exist.

In the path that follows, I moved "C:\ProgramData\Oracle\Java\javapath" behind the current directory "C:\Program Files\Java\jdk\bin;C:\Program Files\Java\jre\bin" > save

Path C:\Program Files\Java\jdk\bin;C:\Program Files\Java\jre\bin;C:\apache-maven-3.5.0\bin;C:\ProgramData\Oracle\Java\javapath

like image 30
user7898610 Avatar answered Oct 14 '22 17:10

user7898610


I also had this problem and was having trouble finding a solution, but now I did!

If you uninstall your current running jre version and then install higher one you are good to go.

I was using jre1.6 when I had this problem but after installing 1.7 it was solved!

like image 42
ric Avatar answered Oct 14 '22 18:10

ric


The problem is that your eclipse cant find jre.Just copy and paste your jre folder into eclipse folder and then start eclipse.Delete environment variable.

like image 23
Suraj Vaishnav Avatar answered Oct 14 '22 17:10

Suraj Vaishnav


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
like image 41
Kokeb Avatar answered Oct 14 '22 18:10

Kokeb