Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have JRE installed on my system. In fact, Eclipse IDE for Java, which also needs JRE, is already running. Now I tried running Eclipse for PHP and it says -

A JRE or JDK must be available in order to run eclipse. No Java virtual machine was found after searching the following locations:

D:\setups\eclipse for php\eclipse\jre\bin\java.exe
java.exe in your path

I think I just need to correct the path to JRE in the config somewhere. Where to do it? I know the path of the JRE exe file.

Also, how to check in command line, which version of JRE is running?


share|improve this question
up vote 0 down vote accepted

Easiest solution is to do as it suggests and put java in your PATH system variable.

Go to your system properties, click "environment variables" and then add the path to your java bin folder in to the PATH variable (or create one if it doesn't exist). You will need to reboot for it to take effect.

on the command line, just run "java -version" (that will work once you have your PATH set)

share|improve this answer
Okay, thanks for that. I opened the "Enviroment variables" section and I can see two sections - 1. User variables for <Username> and 2. System variables. The "User variables for <Username>" section has Variable, Value entries. There is one entry called PATH having one value already (path to bin folder of another software). So, do I need to add path to java bin folder there? How exactly to add? – Sandeepan Nath Jun 10 '11 at 10:21
Click on PATH, then Edit. Put the directory location to java.exe (C:\Program Files (x86)\Java\jdk1.6.0_23\bin on mine for example) after the first location and separate it with a semicolon ; – Nick Downton Jun 10 '11 at 10:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.