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.
d:\java\include
and
d:\java\include\win32
directories. Then click OK. These are
the directories needed when including jni.h.d:\java\bin
directory, then click OK.
This is the directory needed to find javac.
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.jar
and
dbexamples.jar
files in one of the following
Berkeley DB subdirectories, depending on the configuration that you chose:
build_windows\Win32\Debug
|
build_windows\Win32\Release
|
d:\java\include
and d:\java\include\win32
directories.
These are the directories needed when including jni.h
.d:\java\bin
directory. This is the directory needed to
find javac.
To build, select Build -> Build
libdb_java48.dll. This builds the Java support
library for Berkeley DB and compiles all the java files, placing
the resulting db.jar
and
dbexamples.jar
files in one of the following
Berkeley DB subdirectories, depending on the configuration that you chose:
build_windows\Win32\Debug
|
build_windows\Win32\Release
|
To run Java code, set your environment variable CLASSPATH
to include the full pathname of these jar files, and your environment
variable PATH
to include the build_windows\Win32\Release
subdirectory. On Windows, remember that files or directories in the
CLASSPATH
and PATH
variables must be
separated by semicolons (unlike UNIX). Then, try running the following command
as a test:
java db.AccessExample
If you want to run Java code using a Debug build, substitute 'Debug' for 'Release' in the instructions above. Make sure you use the Debug JAR file with the Debug DLL and the Release JAR with the Release DLL.