aboutsummaryrefslogtreecommitdiffstats
path: root/tools/dicttool/etc/dicttool_aosp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/dicttool/etc/dicttool_aosp')
-rwxr-xr-xtools/dicttool/etc/dicttool_aosp11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/dicttool/etc/dicttool_aosp b/tools/dicttool/etc/dicttool_aosp
index 65a1c3a1c..09d65c691 100755
--- a/tools/dicttool/etc/dicttool_aosp
+++ b/tools/dicttool/etc/dicttool_aosp
@@ -68,5 +68,14 @@ else
libpath="$frameworkdir/$lib"
fi
+# Check if the host Java executable supports a 32-bit JVM. It needs to do because the JNI
+# library is 32-bit.
+${DICTTOOL_JAVA-java} -d32 -version > /dev/null 2>&1
+if [[ $? != 0 ]] ; then
+ echo Please specify a Java executable that supports a 32-bit JVM as DICTTOOL_JAVA.
+ exit 1
+fi
+
# might need more memory, e.g. -Xmx128M
-exec java -ea -classpath "$libpath":"$jarpath" -Djava.library.path="$libdir" "$classname" "$@"
+exec ${DICTTOOL_JAVA-java} -d32 -ea -classpath "$libpath":"$jarpath" \
+ -Djava.library.path="$libdir" "$classname" "$@"