Eclipse will not open due to environment variables [duplicate]
I just rebooted my computer without changing anything. Suddenly I can't open Eclipse. Instead, I get this error message:
┌──────────────────────────────────────────────────────────────────────┐
│ 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 │ │
│ └────────────┘ │
└──────────────────────────────────────────────────────────────────────┘
And I see all my environment variables have been erased. java
, javac
, mvn
, etc. don't work. What do I do now, and how do I fix this?
Let eclipse use your java vm directly!
Put these lines at the end of eclipse.ini (located in the directory where eclipse.exe is present):
-vm
<your path to jdk|jre>/bin/javaw.exe
Pay attention that there are two lines. Also make sure that the -vm option is before the -vmargs option (and of course after "openFile").
Useful link Eclispe.ini at wiki.eclipse.org
I think I found an easier way (for me anyway). Locate your javaw.exe file (either by searching for it or just where you installed it), then drag the javaw.exe file onto the eclipse.exe file and it will use it.
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 ?
First uninstall all java software like JRE 7 or JRE 6 or JDK ,then open the following path :
START > CONTROL PANEL > ADVANCED SETTING > ENVIRONMENT VARIABLE > SYSTEM VARIABLE > PATH
Then click on Edit button and paste the following text to Variable_Value and click OK.
C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\
Now go to this url http://java.com/en/download/manual.jsp and click on Windows Offline and click on run and start again eclipse.
Enjoy it!
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
Eclipse and Java JDK (or JRE) must match regarding the BIT Version
For example:
32 Bit Eclipse won't work with 64 Bit Java!
32 Bit Eclipse needs 32 Bit Java!
Ok...Ok... Don't worry i am also ruined by this error and fatal and when i got it i was so serious even i was not giving an attention to other work, but i got it, Simply first of all copy this code and paste in your system variable Under path ...
C:\Program Files;C:\Winnt;C:\Winnt\System32;C:\Program Files\Java\jre6\bin\javaw.exe
Now copy the "jre" folder from your path like i have have "jre" under this path
C:\Program Files\Java
and paste it in your eclipse folder means where your eclipse.exe file is placed. like i have my eclipse set up in this location
F:\Softwares\LANGUAGES SOFTEARE\Android Setup\eclipse
So inside the eclipse Folder paste the "jre" FOLDER . If you have "jre6" then rename it as "jre"....and run your eclipse you will got the solution...
//<<<<<<<<<<<<<<----------------------------->>>>>>>>>>>>>>>>>>>
OTHER SOLUTION: 2
If the problem could't solve with the above steps, then follow these steps
- Copy the folder "jre" from your Java path like C:\Program Files\Java\jre6* etc, and paste it in your eclipse directory(Where is your eclipse available)
- Go to eclipse.ini file , open it up.
- Change the directory of your javaw.exe file like
-vmF:\Softwares\LANGUAGES SOFTEARE\Android Setup\eclipse Indigo version 32 Bit\jre\bin/javaw.exe
Now this time when you will start eclipse it will search for javaw.exe, so it will search the path in the eclipse.ini, as it is now in the same folder so, it will start the javaw.exe and it will start working.
If You still have any query you can ask it again, just go on my profile and find out my email id. because i love stack overflow forum, and it made me a programmer.*
very easy, you just copy the folder 'jre' to the folder that you put eclipse. That'all. Jre is the environment, normally it's location in the C:/Programing Files/Java/jre :D
You should install both 32bit & 64bit java (At least JRE), that in case you're using 64bit OS.
java problems solved when I updated my 64bit Java (i'm using 64bit W7 & 64bit eclipse 4.4.0):
http://www.java.com/en/download/manual.jsp
Recommended Version 7 Update 67 Windows Offline (64-bit) filesize: 29.5 MB
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20130807-1835
-product
org.eclipse.epp.package.standard.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
**-vm
C:/Program Files (x86)/Java/jdk1.7.0_45/bin/javaw.exe** =>false
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m
-vm
C:\Program Files (x86)\Java\jdk1.7.0_45\bin\javaw.exe
Copy jre folder present in "C:\Program Files\Java\" directory into eclipse folder.. i.e, C:\eclipse\
It may be bacause you do not have jre installed. Thus go to http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html and download it.
精彩评论