0
votes

We have the following value for JAVA_HOME: C:\Program Files\Java\jre1.8.0_91

We can navigate via Windows Explorer to that location, and you can get to "\bin\java.exe". We've also done a cd to %JAVA_HOME% to verify that resolves correctly.

However, the scanner step in TeamCity is throwing "ERROR: JAVA_HOME exists but does not point to a valid Java home folder. No "\bin\java.exe" file can be found there."

I've noticed that the SonarQube plug-in for TeamCity has a JDK override where you can pass the location of the java home. Does the manual process have the same? We cannot use the TeamCity plug-in because it is not correctly sending the unit tests results to the web app, hence our switch to the manual process.

Any help you can provide would be greatly appreciated!

1
run as admin didn't work? - flakes
Just install a JDK and use that as your JAVA_HOME - Tom
A JRE (Java Runtime Environment) is not the JDK (Java Development Kit). - Mark Rotteveel

1 Answers

1
votes

Are these values being placed in a command line call? Depending on the situation spaces in path names can cause problems with tools. If you can, try installing Java to a folder that does not have spaces. As an alternative you could also use the Windows short name in JAVA_HOME for "Program Files". This is usually "PROGRA~1".