0

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?

Thanks.

Sandeepan Nath
  • 617
  • 6
  • 13
  • 27

1 Answers1

0

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)

Nick Downton
  • 492
  • 2
  • 13
  • Okay, thanks for that. I opened the "Enviroment variables" section and I can see two sections - 1. User variables for and 2. System variables. The "User variables for " 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
  • 1
    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