yg0bfa
Last Updated: February 25, 2016
·
535
· belaezsias
A8b495de4c645ab8b3090ecb92bd5dd9 normal

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...

Say Thanks
Respond