Using RocksDB from SBT
I had some trouble with RocksDB in Scala/SBT setup so this is how I made it work.
Clone the RocksDB from GitHub.
git clone https://github.com/facebook/rocksdb.git
Open NativeLibraryLoader.java file and change the
InputStream is = ClassLoader.getSystemClassLoader().getResourceAsStream(sharedLibraryName);
line to
InputStream is = NativeLibraryLoader.class.getClassLoader().getResourceAsStream(sharedLibraryName);
This is needed otherwise it won't be able to find the shared library.
cd rocksdb
make rocksdbjava
When finished, copy the resulting rocksdbjni[ver-os].jar into the lib directory of your sbt project.
That's all...
Written by Bela Ezsias
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Scala
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#