3

I downloaded Eclipse Juno and I am trying to run it for the first time. System is Win 7 Home Premium and I also downloaded JDK. I am getting the following 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:\Program Files\eclipse\jre\bin\javaw.exe javaw.exe in your current PATH

The javaw.exe file it needs is in... C:\Program Files\Java\jre7\bin\javaw.exe

How do I fix this problem? Thanks in advance

giampaolo
  • 6,906
  • 5
  • 45
  • 73
user2375575
  • 31
  • 1
  • 3

2 Answers2

4

" 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:\Program Files\eclipse\jre\bin\javaw.exe javaw.exe in your current PATH "

You need to install Java JDK: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

and then edit your path location:

Right-click on computer->properties->advanced system settings->advanced->environment variables:

enter image description here

Add C:\Program Files\Java\<JDK version>\bin to your PATH variable.

Also add JAVA_HOME as a system variable. I have my JAVA_HOME set to C:\Program Files\Java\jdk1.7.0_03.

When you are done, start cmd, type java, and hit enter. If you get an error that it can not be found then java is not correctly installed.

Jason
  • 13,563
  • 15
  • 74
  • 125
  • should I put it in under System variables with "Variable Name" = javaw and then the path? – user2375575 May 12 '13 at 19:49
  • System variables, yes. There should already be a path variable there. You can append by adding a semi-colon and then "C:\Program Files\Java\\bin". You should also create a new variable: "JAVA_HOME". My JAVA_HOME is set to `C:\Program Files\Java\jdk1.7.0_03` – Jason May 12 '13 at 19:51
  • note: you'll have to restart every program that uses that variable, so if cmd is running, shut it down and restart it after making the variable change. – Jason May 12 '13 at 19:53
  • 1
    Jason Thanks, You are the bomb... God bless you. bye – user2375575 May 12 '13 at 20:01
  • hmmm nevermind. you may not have enough reputation. normally there is a check mark underneath the upvote/downvote – Jason May 12 '13 at 20:05
0

You just need to have a Java environment installed in one of the locations Eclipse looks. For Eclipse you do NOT need the full JDK.

It is enough to install a Java Runtime Environment, e.g. from java.com. This still allows you to develop against any JDK - this is just about the JVM that Eclipse needs for itself.

Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347