Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sonar runner: JAVA_HOME exists but does not point to a valid Java home folder

Situation : I installed Sonarqube on a Win XP 32-bit system. I set all paths as instructed. The server opens up well at localhost://9090.

My JAVA_HOME is: C:\Program Files\Java\jdk1.7.0_60;

Problem When I run, sonar-runner.bat, I get the following error:

ERROR: Java_Home exists but does not point to a valid Java home folder. No "\bin\java.exe" file can be found here.

What I tried: I added /bin to the path. I tried /jre, and then /jre/bin (Note: all of them contain the "/bin/java.exe" within them.

Is this due to some permissions issue of the Java (or Jdk) folder ?

like image 583
Abhishek Avatar asked Jun 30 '14 11:06

Abhishek


People also ask

How do you fix please set the JAVA_HOME variable in your environment to match the location of your Java installation?

To set JAVA_HOME, do the following: Right click My Computer and select Properties. On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.

Where is JAVA_HOME supposed to point?

If you're doing any sort of development, or building with Maven or Ant, you need to point to the JDK (Java Development Kit) where utilities such as javac (the Java Compiler) reside. Otherwise, you can point to the JRE (Java Runtime Environment).

Why JAVA_HOME is not working?

All you need to do to fix this error is edit the JAVA_HOME variable and point it to the correct directory. The JAVA_HOME environment variable must point to the root of the installation folder of a JDK. It cannot point to a sub-directory of the JDK, and it cannot point to a parent directory that contains the JDK.


1 Answers

Remove the semicolon ; from the end; right now it's being included in the constructed path.

This variable is expected to be a single directory, not a list, and should not have a path separator.

like image 146
Dave Newton Avatar answered Sep 19 '22 15:09

Dave Newton