I am trying to get Eclipse Galileo to re-run on my computer - i have run it before with no problems but now i keep getting this 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:\eclipse\jre\javaw.exe javaw.exe in your current PATH
I've just done a fresh install of both the JDK and the SDK
I have Windows 7 (x64)
what's up with this? / how do i fix it->?
UPDATE-> i can't run any of the ipconfig / tracert / ping
(Just copying a former deleted answer, moved to this question:)
ReplyDeleteEclipse will try to launch with the default "java.exe" (the first one referenced by your PATH)
Three things to remember:
"installing" a JRE or a JDK can be as simple as unzipping or copying it from another computer: there is no special installation steps, and you can have as many different JVM versions (1.4, 5.0, 6.0...) as you want, "installed" (copied) almost anywhere on your disk.
I would recommend to always run Eclipse with the lastest JRE possible (to benefit from the latest hotspot evolutions).
You can:
reference that exact JRE path in your eclipse.ini.
copying any JRE of your in your /jre directory
In both cases, no PATH to update.
the JVM you will reference within your Eclipse session is not always the one used for launching Eclipse because:
you only need a JRE to launch Eclipse, but once Eclipse launched, you should register a JDK for your projects (especially for Java sources and debugging purposes, also in theory for compilation but Eclipse has its own Java compiler)
Note: You could register just a JRE within Eclipse because it is enough to run your program, but again a JVM will allow for more operations.
Even though the default registered Java in Eclipse is the one used to launch the session, you can want to register an older SDK (including a non-Sun one) in order to run/debug your programs with a JRE similar to the one which will actually be used in production.
Open up Windows' System Properties from the control panel and hunt down the environment variables section:
ReplyDeleteAdd a JAVA_HOME entry pointing to the directory where the JDK is installed (e.g. C:\Program Files\Java\jre6)
Find the Path entry and add the following onto the end ;%JAVA_HOME%\bin
OK the changes
Restart eclipse so that it is aware of the new environment
Most Java tools will now be able to find your Java installation either by using the JAVA_HOME environment variable or by looking for java.exe / javaw.exe in the Path environment variable.
...in your current PATH
ReplyDeleteIt said PATH, not JAVA_HOME.
Rightclick My Computer and choose Properties (or click Winkey+Pause), go to the tab Advanced, click the button Environment Variables, in the System Variables list at the bottom select Path (no, not Classpath), click Edit and add ;c:\path\to\jdk\bin to the end of the value.
Alternatively and if not present, you can also add JAVA_HOME environment variable and make use of it. In the same dialogue click New and add JAVA_HOME with the value of c:\path\to\jdk. Then you can make use of it in the Path by adding ;%JAVA_HOME%\bin to end of the value.
If you download the 64 bit version of Eclipse; it will look for the 64 bit version of JRE.
ReplyDeleteIf you download the 32 bit version of Eclipse; it will look for the 32 bit version of JRE
What I did was to install the both the 32 and 64 bit version of JRE. You can get that from the SUN Oracle site. The JAVA site seems to automatically install the 32 bit version of Java. I guess that's because of the web browser.
I have windows 7 64-bit, and I had this same problem with eclipse. To get it to work, I had to use internet explorer (64-bit version) to download java. This was the only way to get java to install a 64-bit version. When I used firefox to install java, it automatically installed a 32-bit version (so idiotic!). And The Eclipse 64-bit version wouldn't detect the java 32-bit version.
ReplyDeleteI had a co-worker with this exact problem last week. He fixed it by installing the x64 version of Eclipse and the x64 JDK.
ReplyDeleteEdit: he reused his old workspace after installing the necessary plugins, so that should not be much of an issue
It turned out that all I needed to do was change the 'path' to:
ReplyDelete"C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;
C:\Program Files (x86)\Java;
C:\Program Files
(x86)\Java\jdk1.6.0_14\bin"
that did it :)
Check Window > Preferences > Java > Installed JREs. Make sure there's something there; if there isn't, add one.
ReplyDeleteDid you recently update your JDK?
The JDK does not install a JVM in the default path.
ReplyDeleteUnless you need external tools to run like ant, the non-JDK is enough for Eclipse to run. The easiest way to install such a JVM is to go to http://java.com and let it install whatever it want to install.
Then double-click the Eclipse binary again.
set JAVA_HOME variable and ad JAVA_HOME/bin to evnrionment path variable.
ReplyDeleteThere is an easier way to do that. Just run cmd x64. Type cmd x64 to search bar in start menu ant you will find it :) Or alternatively, you should set path to program files (x86) ... For example C:\Program Files (x86)\Java\jre6
ReplyDeleteJust Add the JRE PATH FOR Ex: C:\Program Files\Java\jre5\bin in the environmental variable
ReplyDeletePut ";" in between every path. Then click the eclipse.exe It will work.....
I had the same issue (Windows 7 x64, 64bit JDK, 32bit Eclipse), and I found 2 solutions:
ReplyDeleteInstall the 64 bit version of Eclipse (found by clicking the "Development Builds" tab on the downloads page.)
Install the 32bit version of the JDK.
in the eclipse.ini update the path to the vm to point to where javaw.exe is installed on your machine
ReplyDeletemake a batch file in the eclipse folder and write in it :
ReplyDeleteeclipse -vm C:\Sun\SDK\jdk\jre\bin\javaw.exe
see
http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F
I had the same problem. The easy way, for me to fix it was to install both the JRE and the eclipse as x86 or x64. When their bit type did not match, eclipse could not find it. So, if it is not a big deal for you to uninstall and reinstall in order to make them match, I would do that.
ReplyDeleteI ended up installing:
Java Runtime Environment 1.7.0.3 (64-bit) and
Eclipse Indigo (3.7) (64-bit)
Then it just works.