From 7ff1124e09a6acbb6eb9ea989cb246266c6ecdea Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Fri, 20 Jul 2012 12:42:50 +0000 Subject: [PATCH] SONARPLUGINS-1921 sonar-runner.bat fails when java.exe is found in the path but contains a space --- src/main/assembly/bin/sonar-runner.bat | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/assembly/bin/sonar-runner.bat b/src/main/assembly/bin/sonar-runner.bat index 6f24d89..e75cf91 100644 --- a/src/main/assembly/bin/sonar-runner.bat +++ b/src/main/assembly/bin/sonar-runner.bat @@ -16,6 +16,11 @@ if not "%JAVA_HOME%" == "" goto foundJavaHome for %%i in (java.exe) do set JAVA_EXEC=%%~$PATH:i +if not "%JAVA_EXEC%" == "" { + set JAVA_EXEC="%JAVA_EXEC%" + goto OkJava +} + if not "%JAVA_EXEC%" == "" goto OkJava echo. -- 2.39.5