| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 6 | <title>Building the Java API</title> |
| 7 | <link rel="stylesheet" href="gettingStarted.css" type="text/css" /> |
| 8 | <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> |
| 9 | <link rel="start" href="index.html" title="Berkeley DB Installation and Build Guide" /> |
| 10 | <link rel="up" href="build_win.html" title="Chapter 5. Building Berkeley DB for Windows" /> |
| 11 | <link rel="prev" href="win_build_stl.html" title="Building the C++ STL API" /> |
| 12 | <link rel="next" href="build_win_csharp.html" title="Building the C# API" /> |
| 13 | </head> |
| 14 | <body> |
| 15 | <div xmlns="" class="navheader"> |
| 16 | <div class="libver"> |
| 17 | <p>Library Version 11.2.5.3</p> |
| 18 | </div> |
| 19 | <table width="100%" summary="Navigation header"> |
| 20 | <tr> |
| 21 | <th colspan="3" align="center">Building the Java API</th> |
| 22 | </tr> |
| 23 | <tr> |
| 24 | <td width="20%" align="left"><a accesskey="p" href="win_build_stl.html">Prev</a> </td> |
| 25 | <th width="60%" align="center">Chapter 5. |
| 26 | Building Berkeley DB for Windows |
| 27 | </th> |
| 28 | <td width="20%" align="right"> <a accesskey="n" href="build_win_csharp.html">Next</a></td> |
| 29 | </tr> |
| 30 | </table> |
| 31 | <hr /> |
| 32 | </div> |
| 33 | <div class="sect1" lang="en" xml:lang="en"> |
| 34 | <div class="titlepage"> |
| 35 | <div> |
| 36 | <div> |
| 37 | <h2 class="title" style="clear: both"><a id="build_win_java"></a>Building the Java API</h2> |
| 38 | </div> |
| 39 | </div> |
| 40 | </div> |
| 41 | <p>Java support is not built automatically. The following instructions |
| 42 | assume that you have installed the Sun Java Development Kit in |
| 43 | <code class="filename">d:\java</code>. Of course, if you installed elsewhere or have |
| 44 | different Java software, you will need to adjust the pathnames |
| 45 | accordingly.</p> |
| 46 | <div class="orderedlist"> |
| 47 | <ol type="1"> |
| 48 | <li>Set your include directories. |
| 49 | <div class="itemizedlist"><ul type="disc"><li> |
| 50 | In Visual Studio 2005/Visual Studio 2008 - Choose <span class="emphasis"><em>Tools -> Options |
| 51 | -> Projects -> VC++ Directories</em></span>. Under the "Show |
| 52 | directories for" pull-down, select "Include files". Add the full |
| 53 | pathnames for the <code class="filename">d:\java\include</code> and |
| 54 | <code class="filename">d:\java\include\win32</code> directories. Then click OK. |
| 55 | </li><li> |
| 56 | In Visual Studio 2010 - Right-click db_java project, choose <span class="emphasis"><em>Properties->Configuration Properties-> VC++ Directories->Include Directories</em></span>. |
| 57 | Add the full pathnames for the <code class="filename">d:\java\include</code> and <code class="filename">d:\java\include\win32</code> directories. Then click OK. |
| 58 | </li></ul></div> |
| 59 | These are |
| 60 | the directories needed when including jni.h.</li> |
| 61 | <li>Set the executable files directories. |
| 62 | <div class="itemizedlist"><ul type="disc"><li> |
| 63 | In Visual Studio 2005/Visual Studio 2008 - Choose <span class="emphasis"><em>Tools -> |
| 64 | Options -> Projects -> VC++ Directories</em></span>. Under the "Show |
| 65 | directories for" pull-down, select "Executable files". Add the full |
| 66 | pathname for the <code class="filename">d:\java\bin</code> directory, then click OK. |
| 67 | </li><li> |
| 68 | In Visual Studio 2010 - Right-click db_java project, choose <span class="emphasis"><em>Properties->Configuration Properties-> VC++ Directories->Executable Directories</em></span>. Add the full pathnames for the <code class="filename">d:\java\bin</code> directories. Then click OK. |
| 69 | </li></ul></div> |
| 70 | |
| 71 | This is the directory needed to find javac.</li> |
| 72 | <li>Set the build type to Release or Debug in the drop-down on the |
| 73 | tool bar.</li> |
| 74 | <li> |
| 75 | <p> |
| 76 | To build, right-click on db_java and select Build. This builds the |
| 77 | Java support library for Berkeley DB and compiles all the java files, |
| 78 | placing the resulting <code class="filename">db.jar</code> and |
| 79 | <code class="filename">dbexamples.jar</code> files in one of the following |
| 80 | Berkeley DB subdirectories, depending on the configuration that you chose: |
| 81 | </p> |
| 82 | <table class="simplelist" border="0" summary="Simple list"> |
| 83 | <tr> |
| 84 | <td> |
| 85 | <code class="filename">build_windows\Win32\Debug</code> |
| 86 | </td> |
| 87 | </tr> |
| 88 | <tr> |
| 89 | <td> |
| 90 | <code class="filename">build_windows\Win32\Release</code> |
| 91 | </td> |
| 92 | </tr> |
| 93 | </table> |
| 94 | </li> |
| 95 | </ol> |
| 96 | </div> |
| 97 | </div> |
| 98 | <div class="navfooter"> |
| 99 | <hr /> |
| 100 | <table width="100%" summary="Navigation footer"> |
| 101 | <tr> |
| 102 | <td width="40%" align="left"><a accesskey="p" href="win_build_stl.html">Prev</a> </td> |
| 103 | <td width="20%" align="center"> |
| 104 | <a accesskey="u" href="build_win.html">Up</a> |
| 105 | </td> |
| 106 | <td width="40%" align="right"> <a accesskey="n" href="build_win_csharp.html">Next</a></td> |
| 107 | </tr> |
| 108 | <tr> |
| 109 | <td width="40%" align="left" valign="top">Building the C++ STL API </td> |
| 110 | <td width="20%" align="center"> |
| 111 | <a accesskey="h" href="index.html">Home</a> |
| 112 | </td> |
| 113 | <td width="40%" align="right" valign="top"> Building the C# API</td> |
| 114 | </tr> |
| 115 | </table> |
| 116 | </div> |
| 117 | </body> |
| 118 | </html> |