Support for installing SDK in C:\Program Files
Properly handles spaces in installation pathname on Windows.
Change-Id: I8bcfd18fddbe6d5ad70a8563e8696af2876c1d1b
diff --git a/find_java/find_java.bat b/find_java/find_java.bat
index 6355f23..e7bc590 100755
--- a/find_java/find_java.bat
+++ b/find_java/find_java.bat
@@ -23,14 +23,14 @@
rem Check we have a valid Java.exe in the path. The return code will
rem be 0 if the command worked or 1 if the exec failed (program not found).
-for /f %%a in ('%~dps0\find_java.exe -s') do set java_exe=%%a
+for /f "delims=" %%a in ('"%~dps0\find_java.exe" -s') do set java_exe=%%a
if not defined java_exe goto :CheckFailed
:SearchJavaW
rem Check if we can find a javaw.exe at the same location than java.exe.
rem If that doesn't work, just fall back on the java.exe we just found.
-for /f %%a in ('%~dps0\find_java.exe -s -w') do set javaw_exe=%%a
-if not exist %javaw_exe% set javaw_exe=%java_exe%
+for /f "delims=" %%a in ('"%~dps0\find_java.exe" -s -w') do set javaw_exe=%%a
+if not exist "%javaw_exe%" set javaw_exe=%java_exe%
goto :EOF