Skip to main content

Eclipse - no Java (JRE) / (JDK) … no virtual machine



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


Comments

  1. (Just copying a former deleted answer, moved to this question:)

    Eclipse 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.

    ReplyDelete
  2. Open up Windows' System Properties from the control panel and hunt down the environment variables section:


    Add 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.

    ReplyDelete
  3. ...in your current PATH


    It 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.

    ReplyDelete
  4. If you download the 64 bit version of Eclipse; it will look for the 64 bit version of JRE.
    If 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.

    ReplyDelete
  5. 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.

    ReplyDelete
  6. I had a co-worker with this exact problem last week. He fixed it by installing the x64 version of Eclipse and the x64 JDK.

    Edit: he reused his old workspace after installing the necessary plugins, so that should not be much of an issue

    ReplyDelete
  7. It turned out that all I needed to do was change the 'path' to:


    "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 :)

    ReplyDelete
  8. Check Window > Preferences > Java > Installed JREs. Make sure there's something there; if there isn't, add one.

    Did you recently update your JDK?

    ReplyDelete
  9. The JDK does not install a JVM in the default path.

    Unless 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.

    ReplyDelete
  10. set JAVA_HOME variable and ad JAVA_HOME/bin to evnrionment path variable.

    ReplyDelete
  11. There 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

    ReplyDelete
  12. Just Add the JRE PATH FOR Ex: C:\Program Files\Java\jre5\bin in the environmental variable
    Put ";" in between every path. Then click the eclipse.exe It will work.....

    ReplyDelete
  13. I had the same issue (Windows 7 x64, 64bit JDK, 32bit Eclipse), and I found 2 solutions:


    Install the 64 bit version of Eclipse (found by clicking the "Development Builds" tab on the downloads page.)
    Install the 32bit version of the JDK.

    ReplyDelete
  14. in the eclipse.ini update the path to the vm to point to where javaw.exe is installed on your machine

    ReplyDelete
  15. make a batch file in the eclipse folder and write in it :

    eclipse -vm C:\Sun\SDK\jdk\jre\bin\javaw.exe


    see
    http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F

    ReplyDelete
  16. 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.

    I ended up installing:
    Java Runtime Environment 1.7.0.3 (64-bit) and
    Eclipse Indigo (3.7) (64-bit)

    Then it just works.

    ReplyDelete

Post a Comment

Popular posts from this blog

[韓日関係] 首相含む大幅な内閣改造の可能性…早ければ来月10日ごろ=韓国

div not scrolling properly with slimScroll plugin

I am using the slimScroll plugin for jQuery by Piotr Rochala Which is a great plugin for nice scrollbars on most browsers but I am stuck because I am using it for a chat box and whenever the user appends new text to the boxit does scroll using the .scrollTop() method however the plugin's scrollbar doesnt scroll with it and when the user wants to look though the chat history it will start scrolling from near the top. I have made a quick demo of my situation http://jsfiddle.net/DY9CT/2/ Does anyone know how to solve this problem?

Why does this javascript based printing cause Safari to refresh the page?

The page I am working on has a javascript function executed to print parts of the page. For some reason, printing in Safari, causes the window to somehow update. I say somehow, because it does not really refresh as in reload the page, but rather it starts the "rendering" of the page from start, i.e. scroll to top, flash animations start from 0, and so forth. The effect is reproduced by this fiddle: http://jsfiddle.net/fYmnB/ Clicking the print button and finishing or cancelling a print in Safari causes the screen to "go white" for a sec, which in my real website manifests itself as something "like" a reload. While running print button with, let's say, Firefox, just opens and closes the print dialogue without affecting the fiddle page in any way. Is there something with my way of calling the browsers print method that causes this, or how can it be explained - and preferably, avoided? P.S.: On my real site the same occurs with Chrome. In the ex