diff --git a/doc/src/sgml/jdbc.sgml b/doc/src/sgml/jdbc.sgml index 14de3284f3..509ab28c87 100644 --- a/doc/src/sgml/jdbc.sgml +++ b/doc/src/sgml/jdbc.sgml @@ -1,5 +1,5 @@ @@ -8,8 +8,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.26 2001/10/12 23:32:33 Author - Written by Peter T. Mount (peter@retep.org.uk), the - author of the JDBC driver. + Originally written by Peter T. Mount (peter@retep.org.uk), + the original author of the JDBC driver. @@ -41,14 +41,19 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.26 2001/10/12 23:32:33 Setting up the <acronym>JDBC</acronym> Driver - Building the Driver + Getting the Driver - Precompiled versions of the driver are regularly made available on + Precompiled versions of the driver can be downloaded from the PostgreSQL - JDBC web site. Here we describe how to - build the driver manually. + JDBC web site. + + + + Alternatively you can build the driver from source. Although you + should only need to do this if you are making changes to the source + code. @@ -70,27 +75,37 @@ JAVACMD=$JAVA_HOME/bin/java - The build the driver, add the option to your + To build the driver, add the option to your configure command line, e.g., $ ./configure --prefix=xxx --with-java ... This will build and install the driver along with the rest of the PostgreSQL package when you issue the - gmake and gmake install + make/gmake and make/gmake install commands. If you only want to build the driver and not the rest of PostgreSQL, change into the directory src/interfaces/jdbc and issue the - respective make command there. Refer to the + respective make/gmake command there. Refer to the PostgreSQL installation instructions for more information about the configuration and build process. + When building the driver from source the jar file that is created + will be named postgresql.jar. The build will + create this file in the src/interfaces/jdbc/jars + directory. The resulting driver will be built for the version of + Java you are running. If you build with a 1.1 JDK you will build + a version that supports the jdbc1 specification, if you build with a + Java2 JDK (i.e. JDK1.2 or JDK1.3) you will build a version that + supports the jdbc2 specification. + + - Do not try to build by calling javac directly, - as the driver uses some dynamic loading techniques for + Do not try to build the driver by calling javac + directly, as the driver uses some dynamic loading techniques for performance reasons, and javac cannot cope. Do not try to run ant directly either, because some configuration information is communicated through the @@ -104,8 +119,12 @@ JAVACMD=$JAVA_HOME/bin/java Setting up the Class Path - To use the driver, the jar archive - postgresql.jar needs to be included in the + To use the driver, the jar archive (named + postgresql.jar if you built from source, otherwise + it will likely be named jdbc7.2-1.1.jar or + jdbc7.2-1.2.jar for the jdbc1 and jdbc2 versions + respectively) + needs to be included in the class path, either by putting it in the CLASSPATH environment variable, or by using flags on the java command line. By default, the jar archive @@ -113,7 +132,8 @@ JAVACMD=$JAVA_HOME/bin/java class="directory">/usr/local/pgsql/share/java. You may have it in a different directory if you used the option when you ran - configure. + configure, or if you are using a binary distribution + that places it in some different location. @@ -124,16 +144,16 @@ JAVACMD=$JAVA_HOME/bin/java JDBC driver installed in the /usr/local/lib directory, and the Java JDK installed in - /usr/local/jdk1.1.6. To run the + /usr/local/jdk1.3.1. To run the application, I would use: export CLASSPATH=/usr/local/lib/finder.jar:/usr/local/pgsql/share/java/postgresql.jar:. -java uk.org.retep.finder.Main +java Finder - finder.jar contains my application. + finder.jar contains the Finder application. @@ -150,10 +170,12 @@ java uk.org.retep.finder.Main Preparing the Database for <acronym>JDBC</acronym> - Because Java can only use TCP/IP connections, the - Postgres server must be configured to - accept TCP/IP connections, for instance by supplying the - option flag when starting the + Because Java only uses TCP/IP connections, the + PostgreSQL server must be configured to + accept TCP/IP connections. This can be done by setting + tcpip_socket = true in the + postgresql.conf file or by supplying the + option flag when starting postmaster. @@ -162,7 +184,7 @@ java uk.org.retep.finder.Main pg_hba.conf file may need to be configured. Refer to the Administrator's Guide for details. The JDBC Driver supports trust, - ident, password, and md5, crypt authentication methods. + ident, password, md5, and crypt authentication methods.