To compile the driver, simply use make in the src/interfaces/jdbc directory.
This will compile the driver, and build a .jar file (Java ARchive).
There are actually two versions of the driver. One for the JDBC1.2 specification, and one for the JDBC2 specification. To compile the driver, you need to select the correct one.
REMEMBER: once you have compiled the driver, it will work on ALL platforms
that support the JDK 1.1 api or later.
If you have JDK1.1.x you need to type: make jdbc1
The V6.5 driver introduced support for the JDBC2 specification (which is used
with JDK 1.2 api and later). This caused us some problems because classes
written for JDBC1 and JDBC2 are not compatible, so a large chunk of the
driver had to be re-written to accomodate this.
If you have JDK1.2 or JDK1.3, you need to type: make jdbc2
Running make will build a .jar file (postgresql.jar) which contains the driver.
That jar file will contain the driver for _your_ version of the JDK. That is,
if you run make using JDK 1.1.7, then you will get the JDBC1 driver. If you
run using 1.2 then you will get the JDBC2 driver.
This will compile the driver, and build a .jar file (Java ARchive) called
postgresql.jar
Tip: If you want the driver to run on both JDBC1 or JDBC2, first compile under
JDK 1.1.x, then recompile under JDK 1.2.
That jar file will contain the driver for _your_ version of the JDK.
In testing, I've done this using 1.1.6 (running under linux), and running make
on my Win95 based Laptop (CygWin B20.1 was used to get a GNUMake - and a
decent shell {bash}).
When the .jar file is built, it includes all the classes under postgresql, and
the driver automatically selects the correct classes.
REMEMBER: Once you have compiled the driver, it will work on ALL platforms
that support that version of the API. You don't need to build it for each
platform.
That means you don't have to compile it on every platform. Believe me, I
still hear from people who ask me "I've compiled it ok under Solaris, but it
...
...
@@ -78,20 +60,12 @@ versions of the backend) on my web site http://www.retep.org.uk/postgres/
INSTALLING THE DRIVER
To install the driver, the .class files have to be in the classpath. This can be
done in two ways:
1: create a directory "postgresql" (and it must be called this) in the current
directory (or a directory in the class path), and copy all .class files
into it.
To install the driver, the .class files have to be in the classpath. To do
this, copy the postgres.jar file into a directory, and add it to the classpath.
2: copy the postgres.jar file into a directory, and add it to the classpath.
ie: under LINUX/SOLARIS (the example here is my linux box):
ie: under LINUX/SOLARIS (the example here is my linux box):