Berkeley DB XML Binaries on Windows

Windows Installer Options
Installation Layout
General Note on Using Windows Binaries
Using C++ Runtime Libraries and Programs
Using Java Binaries
Installing and Using Python Binaries
Installing and Using Perl Binaries

Executable files and libraries are available for Berkeley DB XML. They may be downloaded in the form of a Windows installer package dbxml-6.0.xx.msi which must then be installed. The binaries are built using Microsoft Visual Studio 2008 and include language bindings for C++, Java, Python, and Perl. Java is compiled against Java 7, Python is compiled against the 2.7 release of ActivePython, Perl is compiled using ActivePerl 5.16.

There are several installation options for installing Windows binaries ranging from a simple runtime-only deployment to a development installation for all languages. Source code other than examples is not available in the Windows installer package. If source code is desired one of the source downloads must be used.

Windows Installer Options

When installing Berkeley DB XML using the Windows installer you can choose to install any or all of a number of options. By default all options are selected.

  • Core Runtime

    This option includes only the .dll and .exe files required to run Berkeley DB XML C++ applications. This option can only be used to run already-built applications; it cannot be used to build new C++ applications. Program Database (.pdb) files are included for executables and libraries. This option includes the PHP runtime libraries.

  • C++ Development

    This option bundles the runtime libraries and adds the header files and libraries (.lib files) required to compile and link new C++ applications.

  • Documentation

    This option installs the Berkeley DB XML documentation set.

  • Examples

    This option installs example programs for all language bindings.

  • Java Runtime

    This option installs the Java runtime files (.jar) along with the core runtime (native) libraries which are also required for Berkeley DB XML Java applications.

  • Python Runtime

    This option installs executables for Python that require further installation for use. See instructions below.

  • Perl Runtime

    This option installs the core runtime and Perl binaries which require further installation for use. See instructions below.

Installation Layout

The Windows installer allows a choice of installation location. All paths used below are relative to that directory. The installation layout is the same as it is for the default build from source:

  • bin

    Holds exectuables for the core runtime

  • lib

    Holds libraries (.lib) for the C++ development option

  • include

    Holds header files for the C++ development option

  • jar

    Holds Java jar files for the Java runtime option

  • dbxml/doc

    Holds Berkeley DB XML examples for all languages

  • perl

    Holds Perl binaries

  • python

    Holds Python binaries

General Note on Using Windows Binaries

Because of the nature of some of the scripting language integrations it can be necessary to use the same compiler for the scripting language itself as for language extensions such as Berkeley DB XML support. For this reason the binaries provided may not work in all cases. If a particular installation has problems it may be necessary to compile from source in the case of Python and Perl.

Using C++ Runtime Libraries and Programs

It is necessary to set your PATH to run all Berkeley DB XML C++ and Java applications PATH needs <InstallDir>/bin. By default the installer will set the PATH and CLASSPATH of the installing user to include the relevant directories and files.

C++ example programs, if installed, can be found in <InstallDir>/dbxml/examples/cxx. Visual Studio project files for the examples are in <InstallDir>/dbxml/build_windows and can be used as templates for new applications.

Using Java Binaries

It is necessary to set your PATH and CLASSPATH to run Berkeley DB XML Java applications. CLASSPATH needs <InstallDir>/jar/db.jar;<InstallDir>/jar/dbxml.jar. See above for PATH additions. By default the installer will set the PATH and CLASSPATH of the installing user to include the relevant directories and files.

Java example programs, if installed, can be found in <InstallDir>/dbxml/examples/java. Many users develop and deploy Berkeley DB XML Java applications in an application server environment such as Tomcat. Most of these servers ignore PATH and CLASSPATH for applications (for security reasons) so it is necessary to follow product-specific instructions for correct application deployment.

Installing and Using Python Binaries

Python binaries are built and packaged in executable files that can be installed on a machine that has the 32 bit ActivePython 2.7 already installed. There are two files that need to be installed:

  1. <InstallDir>/python/bsddb3-6.1.#.win32-py2.7.exe

    Execute this to install pybsddb release 6.1.

  2. ><InstallDir>/python/dbxml-6.0.xx.win32-py2.7.exe

    Execute this to install Berkeley DB XML libraries

The executables above include all of the dependent libraries so it is not necessary to install either of the core runtime libraries. The installation will fail if Python 2.7 is not installed on the target machine.

Python example programs, if installed, can be found in <InstallDir>/dbxml/examples/python. A simple smoke test that can be done after installation is running the Python example script <InstallDir>/dbxml/examples/python/basic/helloWorld.py. If this works then your installation is good.

Installing and Using Perl Binaries

Perl binaries are built and bundled into the compressed tar archive file <InstallDir>/perl/dbxml_perl.tar.gz. There is also an ActivePerl PPD file — <InstallDir>/perl/dbxml_perl.ppd -- which can be used by the PPM program for installation. If you have 32 bit ActivePerl version 5.16 or later installed on your system and it includes PPM, then you can do this to install the Perl binaries after initial installation:

  • change directory to <InstallDir>/perl

  • type "ppm install dbxml_perl.ppd"

This will install the Berkeley DB XML Perl binary files in the appropriate location for your system.

Perl example programs, if installed, can be found in <InstallDir>/dbxml/examples/perl/gettingStarted. When using these examples, always start with loadExamplesData.pl. There is a Readme.txt file for the gettingStarted examples in this directory.