views:

354

answers:

3

Hi I just rebooted my computer without changing anything suddenly I can't open my eclipse I get his error message alt text

And I see all my enviromental variables have been erased. Java , javac, mvn obviously doesn't work .. what do I do now , how do I fix this ?


For those unfortunate souls who can't get to tinypic.com from work :-)

+----------------------------------------------------------------------+
| Eclipse                                                              |
|                                                                      |
|   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:\Users\emiri\Downloads\eclipse\jre\bin\javaw.exe               |
|     javaw.exe in your current PATH                                   |
|                                                      +------------+  |
|                                                      |     OK     |  |
|                                                      +------------+  |
|                                                                      |
+----------------------------------------------------------------------+
+1  A: 

Let eclipse use your java directly! Put these lite to the end of eclipse.ini (located in directory, where eclipse.exe is present): -vm /bin/javaw.exe

Paid attention that there are two lines

Usefull link Eclispe.ini at wiki.eclipse.org

St.Shadow
Much more *complete* `eclipse.ini`: http://stackoverflow.com/questions/142357/what-are-the-best-jvm-settings-for-eclipse/1409590#1409590
VonC
Really, cool configuration. Need try it.
St.Shadow
A: 

Another alternative is to re-run the JRE setup. It typically installs a default JRE by placing java.exe, javaw.exe, etc. in your system folder. That would place the executables in your path, which should be sufficient, based on the note in the error message that it searched your path for javaw.exe

Phil Hayward
Bad idea. Java completly poratable - it doesn't need reinstall on every system problem
St.Shadow
A: 

Here is the answer, sorry .. but your solutions weren't correct

set PATH=C:\Program Files\Java\jre1.6.0_03\bin ;%PATH%

paxdiablo Did you rewrite the error or you got some kind of software reading text from image, if you got which one ?

Gandalf StormCrow
But then you are stuck with a single VM...not a good solution if you need to support multiple versions
Greg
@Gandalf: No, it was painstakingly re-typed - I was bored and there weren't many questions coming in that I could answer :-)
paxdiablo
@paxdiablo - I thank you for that ..
Gandalf StormCrow