aboutsummaryrefslogtreecommitdiffstats
path: root/find_java
diff options
context:
space:
mode:
authorScott Barta <sbarta@google.com>2013-08-15 15:19:09 -0700
committerScott Barta <sbarta@google.com>2013-08-15 15:19:09 -0700
commit7405017e91c15bbc58aa31cbd946091949d44490 (patch)
tree735ca3d90bd4fc7004500c10389efe1cc87b7851 /find_java
parent6da9a761cd06c67a9c30534b4da2b8447aced5d0 (diff)
downloadsdk-7405017e91c15bbc58aa31cbd946091949d44490.zip
sdk-7405017e91c15bbc58aa31cbd946091949d44490.tar.gz
sdk-7405017e91c15bbc58aa31cbd946091949d44490.tar.bz2
Support for installing SDK in C:\Program Files
Properly handles spaces in installation pathname on Windows. Change-Id: I8bcfd18fddbe6d5ad70a8563e8696af2876c1d1b
Diffstat (limited to 'find_java')
-rwxr-xr-xfind_java/find_java.bat6
1 files changed, 3 insertions, 3 deletions
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 http://technet.microsoft.com/en-us/library/bb490890.aspx
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