Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

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
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
add comment

Your Answer

 
discard

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.