diff options
Diffstat (limited to 'ddms/app/etc/ddms.bat')
-rwxr-xr-x | ddms/app/etc/ddms.bat | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ddms/app/etc/ddms.bat b/ddms/app/etc/ddms.bat index ffe536d..c98621b 100755 --- a/ddms/app/etc/ddms.bat +++ b/ddms/app/etc/ddms.bat @@ -24,6 +24,11 @@ rem Change current directory and drive to where the script is, to avoid rem issues with directories containing whitespaces. cd /d %~dp0 +rem Check we have a valid Java.exe in the path. +set java_exe= +call find_java.bat +if not defined java_exe goto :EOF + set jarfile=ddms.jar set frameworkdir= @@ -48,7 +53,7 @@ if not defined ANDROID_SWT goto QueryArch :QueryArch - for /f %%a in ('java -jar %frameworkdir%archquery.jar') do set swt_path=%frameworkdir%%%a + for /f %%a in ('%java_exe% -jar %frameworkdir%archquery.jar') do set swt_path=%frameworkdir%%%a :SwtDone @@ -60,5 +65,5 @@ if exist %swt_path% goto SetPath :SetPath set javaextdirs=%swt_path%;%frameworkdir% -call java %java_debug% -Djava.ext.dirs=%javaextdirs% -Dcom.android.ddms.bindir= -jar %jarpath% %* +call %java_exe% %java_debug% -Djava.ext.dirs=%javaextdirs% -Dcom.android.ddms.bindir= -jar %jarpath% %* |