diff options
author | Xavier Ducrohet <xav@android.com> | 2009-09-24 12:16:03 -0700 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2009-09-24 12:27:37 -0700 |
commit | 8b778e4605e97ff59380adb7128a4474fc355985 (patch) | |
tree | 92cf7de60850295b9fa375267e2756b3d415c355 /ddms | |
parent | 97e1fe7d8d8494ae01fb10b09b80915579b23e2c (diff) | |
download | sdk-8b778e4605e97ff59380adb7128a4474fc355985.zip sdk-8b778e4605e97ff59380adb7128a4474fc355985.tar.gz sdk-8b778e4605e97ff59380adb7128a4474fc355985.tar.bz2 |
Make archquery use the same VM as DDMS/Traceview
archquery is used to figure out whether the VM is 32 or 64 bit, but on
MacOS X, it used the normal "java" command while the application was
forced to use java 1.5
This could lead to cases where archquery ran in 1.6 64bit but the app
in 1.5 32 bit, creating a mismatch and make the app using the wrong
SWT version.
Diffstat (limited to 'ddms')
-rwxr-xr-x | ddms/app/etc/ddms | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/ddms/app/etc/ddms b/ddms/app/etc/ddms index e9ee6a0..873f19e 100755 --- a/ddms/app/etc/ddms +++ b/ddms/app/etc/ddms @@ -62,22 +62,16 @@ else java_debug= fi +javaCmd="java" + # Mac OS X needs an additional arg, or you get an "illegal thread" complaint. if [ `uname` = "Darwin" ]; then os_opts="-XstartOnFirstThread" - #because Java 1.6 is 64 bits only and SWT doesn't support this, we force the usage of java 1.5 - java_cmd="/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/java" else os_opts= - java_cmd="java" fi -if [ "$OSTYPE" = "cygwin" ] ; then - jarpath=`cygpath -w "$frameworkdir/$jarfile"` - progdir=`cygpath -w "$progdir"` -else - jarpath="$frameworkdir/$jarfile" -fi +jarpath="$frameworkdir/$jarfile" # Figure out the path to the swt.jar for the current architecture. # if ANDROID_SWT is defined, then just use this. @@ -87,7 +81,7 @@ swtpath="" if [ -n "$ANDROID_SWT" ]; then swtpath="$ANDROID_SWT" else - vmarch=`java -jar "${frameworkdir}"/archquery.jar` + vmarch=`${javaCmd} -jar "${frameworkdir}"/archquery.jar` if [ -n "$ANDROID_BUILD_TOP" ]; then osname=`uname -s | tr A-Z a-z` swtpath="${ANDROID_BUILD_TOP}/prebuilt/${osname}-${vmarch}/swt" @@ -107,4 +101,4 @@ fi # need to use "java.ext.dirs" because "-jar" causes classpath to be ignored # might need more memory, e.g. -Xmx128M -exec "$java_cmd" -Xmx256M $os_opts $java_debug -Djava.ext.dirs="$frameworkdir" -Dcom.android.ddms.bindir="$progdir" -jar "$jarpath" "$@" +exec "$javaCmd" -Xmx256M $os_opts $java_debug -Djava.ext.dirs="$frameworkdir" -Dcom.android.ddms.bindir="$progdir" -jar "$jarpath" "$@" |