mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-30 04:41:49 +00:00
8c4a3bfa5b
Summary: * [java] Add a java api for rocksdb::Options, currently only supports create_if_missing. * [java] Add a test for RocksDBException in RocksDBSample. Test Plan: make jtest Reviewers: haobo, sdong Reviewed By: haobo CC: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D17385
22 lines
613 B
Makefile
22 lines
613 B
Makefile
NATIVE_JAVA_CLASSES = org.rocksdb.RocksDB org.rocksdb.Options
|
|
NATIVE_INCLUDE = ./include
|
|
ROCKSDB_JAR = rocksdbjni.jar
|
|
|
|
clean:
|
|
-find . -name "*.class" -exec rm {} \;
|
|
-find . -name "hs*.log" -exec rm {} \;
|
|
rm -f $(ROCKSDB_JAR)
|
|
|
|
java:
|
|
javac org/rocksdb/*.java
|
|
jar -cf $(ROCKSDB_JAR) org/rocksdb/*.class
|
|
javah -d $(NATIVE_INCLUDE) -jni $(NATIVE_JAVA_CLASSES)
|
|
|
|
sample:
|
|
javac -cp $(ROCKSDB_JAR) RocksDBSample.java
|
|
@rm -rf /tmp/rocksdbjni
|
|
@rm -rf /tmp/rocksdbjni_not_found
|
|
java -ea -Djava.library.path=.:../ -cp ".:./*" RocksDBSample /tmp/rocksdbjni
|
|
@rm -rf /tmp/rocksdbjni
|
|
@rm -rf /tmp/rocksdbjni_not_found
|