Berkeley DB treats records (keys and data) as chunks of binary data.
If you created a database using the Berkeley DB C++ API, and you
want to access the database using the same version of the Berkeley
DB Java API the database files will be compatible. However you'll
need to access the data appropriately for the language. For
example you'll need to account for things like a C++ int size
being machine-dependent while the Java int type is 4-bytes, and
C++ strings are stored as ASCII characters, etc. Note that Berkeley
DB database files are not compatible with Berkeley DB JE log files.