I have a Compile.sh file.
This one works like a charm:
cd src
javac model/JNIResultSet.java
javah -jni model.JNIResultSet
cp model_JNIResultSet.h ./../bin/
cd ..
cd bin
gcc -fPIC -o libspieler.so -shared -I/usr/java/jdk1.8.0_73/include/ SharedTable.c -lc
java -Djava.library.path=./../bin/ app.Main
My problem is that I don't want to have my sources in the bin folder.
I want to have them in a separate folder.
For that my script looks like this one:
cd src
javac model/JNIResultSet.java
javah -jni model.JNIResultSet
cp model_JNIResultSet.h ./../data/
cd ..
cd data
gcc -fPIC -o libspieler.so -shared -I/usr/java/jdk1.8.0_73/include/ SharedTable.c -lc
cd ..
cd bin
java -Djava.library.path=./../data/ app.Main
I don't know why this one isn't working. I get no exception but the program also doesn't work correctly. Do you know how to fix it?
makeinstead of a script?