From 8b778e4605e97ff59380adb7128a4474fc355985 Mon Sep 17 00:00:00 2001 From: Xavier Ducrohet Date: Thu, 24 Sep 2009 12:16:03 -0700 Subject: 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. --- traceview/etc/traceview | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'traceview/etc') diff --git a/traceview/etc/traceview b/traceview/etc/traceview index fc7d8c0..8f52e77 100755 --- a/traceview/etc/traceview +++ b/traceview/etc/traceview @@ -75,13 +75,13 @@ then exit 1 fi +javaCmd="java" + os=`uname` if [ $os == 'Darwin' ]; then javaOpts="-Xmx1600M -XstartOnFirstThread" - javaCmd="/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/java" else javaOpts="-Xmx1600M" - javaCmd="java" fi while expr "x$1" : 'x-J' >/dev/null; do @@ -90,12 +90,7 @@ while expr "x$1" : 'x-J' >/dev/null; do shift done -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. @@ -105,7 +100,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" @@ -123,4 +118,4 @@ else exit 1 fi -exec "$javaCmd" $javaOpts -Djava.ext.dirs="$frameworkdir" -jar "$jarpath" "$@" +exec "${javaCmd}" $javaOpts -Djava.ext.dirs="$frameworkdir" -jar "$jarpath" "$@" -- cgit v1.1