Changeset: 08017e205ab1 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=08017e205ab1 Modified Files: java/embedded/build-all.sh java/embedded/readme.txt java/embedded/src/main/java/org/monetdb/embedded/MonetDBEmbedded.java Branch: embedded-java Log Message:
Adapt to the single embedded lib interface Awesome! diffs (55 lines): diff --git a/java/embedded/build-all.sh b/java/embedded/build-all.sh --- a/java/embedded/build-all.sh +++ b/java/embedded/build-all.sh @@ -11,6 +11,7 @@ cd ../../ ## Bootstrap sh bootstrap rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi + ## Configure mkdir BUILD cd BUILD @@ -22,9 +23,18 @@ cd BUILD --without-samtools --without-sphinxclient --without-geos --without-samtools --without-readline \ --enable-optimize --enable-silent-rules --disable-assert --disable-strict --disable-int128 rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi + ## Build -make -j clean install +make -j rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi + +## Combine libraries +OFILES=`find common clients/mapilib/ gdk monetdb5/mal monetdb5/modules monetdb5/optimizer sql tools/embedded java/embedded -name "*.o" | tr "\n" " "` +gcc -shared -o libmonetdb5.dylib $OFILES -lpthread -lpcre -lbz2 -llzma -lcurl -lz -liconv + +## Copy the single lib +cp libmonetdb5.dylib $MONETDB_HOME/lib + ## Build embedded Java and test cd ../java/embedded mvn clean install diff --git a/java/embedded/readme.txt b/java/embedded/readme.txt --- a/java/embedded/readme.txt +++ b/java/embedded/readme.txt @@ -24,6 +24,8 @@ The process uses the preset MONETDB_HOME Run the build-all.sh found in the directory along with this file, supplying the location of the installation directory as the only argument. $ build-all.sh <location to installation directory> +This script will build the embedded version on MonetDB (and only it), pull all libraries in a single fat lib, copy to the specified dir, build and test the embedded Java + # Usage After building it all, you can use the Java binaries. In the test dir you can see examples of how to use either the native columnar interface or the JDBC one. Remember to set the MONETDB_HOME environmental variable and the -Djava.library.path flag, providing the MonetDB installation directory location. E.g. diff --git a/java/embedded/src/main/java/org/monetdb/embedded/MonetDBEmbedded.java b/java/embedded/src/main/java/org/monetdb/embedded/MonetDBEmbedded.java --- a/java/embedded/src/main/java/org/monetdb/embedded/MonetDBEmbedded.java +++ b/java/embedded/src/main/java/org/monetdb/embedded/MonetDBEmbedded.java @@ -24,7 +24,7 @@ import org.monetdb.embedded.result.Embed public class MonetDBEmbedded implements Closeable { static { // Load the embedded library - System.loadLibrary("embedded_java"); + System.loadLibrary("monetdb5"); } /** * Flag if the embedded database was already started. _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list