Building the Java API
Java support is not built automatically. The following instructions assume that you have installed the Sun Java Development Kit in d:\java. Of course, if you installed elsewhere or have different Java software, you will need to adjust the pathnames accordingly.
Set your include directories.
- In Visual Studio 2005/Visual Studio 2008 - Choose Tools -> Options -> Projects -> VC++ Directories. Under the "Show directories for" pull-down, select "Include files". Add the full pathnames for the
d:\java\includeandd:\java\include\win32directories. Then click OK. - In Visual Studio 2010 - Right-click db_java project, choose Properties->Configuration Properties-> VC++ Directories->Include Directories. Add the full pathnames for the
d:\java\includeandd:\java\include\win32directories. Then click OK.
These are the directories needed when including jni.h.
- In Visual Studio 2005/Visual Studio 2008 - Choose Tools -> Options -> Projects -> VC++ Directories. Under the "Show directories for" pull-down, select "Include files". Add the full pathnames for the
Set the executable files directories.
- In Visual Studio 2005/Visual Studio 2008 - Choose Tools -> Options -> Projects -> VC++ Directories. Under the "Show directories for" pull-down, select "Executable files". Add the full pathname for the
d:\java\bindirectory, then click OK. - In Visual Studio 2010 - Right-click db_java project, choose Properties->Configuration Properties-> VC++ Directories->Executable Directories. Add the full pathnames for the
d:\java\bindirectories. Then click OK.
This is the directory needed to find javac.
- In Visual Studio 2005/Visual Studio 2008 - Choose Tools -> Options -> Projects -> VC++ Directories. Under the "Show directories for" pull-down, select "Executable files". Add the full pathname for the
Set the build type to Release or Debug in the drop-down on the tool bar.
To build, right-click on db_java and select Build. This builds the Java support library for Berkeley DB and compiles all the java files, placing the resulting
db.jaranddbexamples.jarfiles in one of the following Berkeley DB subdirectories, depending on the configuration that you chose:build_windows\Win32\Debugbuild_windows\Win32\Release