Building the Java API with Visual Studio

The Berkeley DB XML Java API is not built automatically. The following instructions assume that you have installed the Sun Java Development Kit in d:/java. If you installed elsewhere or have different Java software you will need to adjust the pathnames accordingly.

  1. Set your include directories. Choose Tools -> Options -> Projects -> VC++ Directories. Under the "Show directories for" pull-down, select "Include files". Add the full pathnames for the java/include and java/include/win32 directories. Then click OK. These are the directories needed when including jni.h.

  2. Set your executable files directories. Choose Tools -> Options -> Projects -> VC++ Directories. Under the "Show directories for" pull-down, select "Executable files". Add the full pathname for the java/bin directory, then click OK. This is the directory needed to find javac.

  3. Set the build type to Release or Debug (or other appropriate configuration) in the drop-down on the .NET tool bar.

  4. Right-click on db_java and select Build. This builds the Java support library for Berkeley DB, which is required for Berkeley DB XML, and compiles all the java files, placing the resulting db.jar and dbexamples.jar files in bin or bin/debug.

  5. Right-click on dbxml_java and select Build. This builds the Java support library for Berkeley DB XML, and compiles all the java files, placing the resulting dbxml.jar and dbxmlexamples.jar files in jar.