34

I want to know if LevelDB supports java ? Where can i get the LevelDB. There are no files under http://code.google.com/p/leveldb/

Viktor Dahl
  • 1,942
  • 3
  • 25
  • 36
Vivek
  • 11,938
  • 19
  • 92
  • 127

4 Answers4

51

You can use the https://github.com/fusesource/leveldbjni java library which gives you a Java API to LevelDB via JNI.

There is also a Pure Java implementation of LevelDB available at https://github.com/dain/leveldb

Both the JNI wrapped and pure Java implementation implement the same interface classes so it's really easy to switch between the two.

Hiram Chirino
  • 4,103
  • 1
  • 22
  • 21
1

You can have a try of leveldb-java. This is a pure Java version of LevelDB.

bluish
  • 26,356
  • 27
  • 122
  • 180
lu wei
  • 11
  • 1
1

LevelDB currently does not ship with JNI bindings, but you can wrap your own JNI binding around the file db/c.h via SWIG and the like.

gabor
  • 4,281
  • 8
  • 24
  • 20
0

From looking at the source, i can say that it doesn't support java.

For the source use svn checkout http://leveldb.googlecode.com/svn/trunk/ leveldb-read-only

Dan D.
  • 73,243
  • 15
  • 104
  • 123
  • Is there any project that is based on LevelDB java implementation ? – Vivek Jul 21 '11 at 16:48
  • if you wanted to use leveldb from java would have to build your own bindings to its C code. i looked to see if some one had already build these but the closest thing i could find was [a leveldb list message](http://groups.google.com/group/leveldb/browse_thread/thread/ac4c7a4c999b1038) in which one person said they played with building bindings with SWIG. – Dan D. Jul 21 '11 at 17:07
  • 1
    There is a java library for LevelDB https://github.com/fusesource/leveldbjni -Informed by Hiram Chirino – Vivek Aug 03 '11 at 05:17
  • Great, that's a jni binding for leveldb. – Dan D. Aug 03 '11 at 09:53
  • The source location has changed. It's now at http://code.google.com/p/leveldb/source/checkout (which tells you to do git clone https://code.google.com/p/leveldb/) – James Moore Mar 16 '12 at 14:21