Adds android example using jni.
This commit is contained in:
parent
b1ad04e306
commit
3492bb7744
13 changed files with 373 additions and 0 deletions
22
examples/cross_calculator/android/scripts/jnibuild.sh
Executable file
22
examples/cross_calculator/android/scripts/jnibuild.sh
Executable file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue