From 3492bb7744bd7b7a90eed6f839fdbb2582b447b6 Mon Sep 17 00:00:00 2001 From: Grzegorz Adam Hankiewicz Date: Sat, 8 Sep 2012 19:16:28 +0200 Subject: Adds android example using jni. --- .../cross_calculator/android/scripts/jnibuild.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 examples/cross_calculator/android/scripts/jnibuild.sh (limited to 'examples/cross_calculator/android/scripts/jnibuild.sh') diff --git a/examples/cross_calculator/android/scripts/jnibuild.sh b/examples/cross_calculator/android/scripts/jnibuild.sh new file mode 100755 index 000000000..8b61f20f7 --- /dev/null +++ b/examples/cross_calculator/android/scripts/jnibuild.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# Force errors to fail script. +set -e + +# If we are running from inside the scripts subdir, get out. +if [ ! -d src ] +then + cd .. +fi + +# Ok, are we out now? +if [ -d src ] +then + javah -classpath bin/classes \ + -o jni/backend-jni.h \ + com.github.nimrod.crosscalculator.CrossCalculator +else + echo "Uh oh, bin/classes directory not found?" + echo "Try compiling your java code, or opening in eclipse." + exit 1 +fi -- cgit 1.4.1-2-gfad0