To compile the driver, simply use make in the src/interfaces/jdbc directory.
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.
This will compile the driver, and build a .jar file (Java ARchive).
REMEMBER: once you have compiled the driver, it will work on ALL platforms
If you have JDK1.1.x you need to type: make jdbc1
that support the JDK 1.1 api or later.
The V6.5 driver introduced support for the JDBC2 specification (which is used
If you have JDK1.2 or JDK1.3, you need to type: make jdbc2
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.
Running make will build a .jar file (postgresql.jar) which contains the driver.
This will compile the driver, and build a .jar file (Java ARchive) called
That jar file will contain the driver for _your_ version of the JDK. That is,
postgresql.jar
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.
Tip: If you want the driver to run on both JDBC1 or JDBC2, first compile under
That jar file will contain the driver for _your_ version of the JDK.
JDK 1.1.x, then recompile under JDK 1.2.
In testing, I've done this using 1.1.6 (running under linux), and running make
REMEMBER: Once you have compiled the driver, it will work on ALL platforms
on my Win95 based Laptop (CygWin B20.1 was used to get a GNUMake - and a
that support that version of the API. You don't need to build it for each
decent shell {bash}).
platform.
When the .jar file is built, it includes all the classes under postgresql, and
the driver automatically selects the correct classes.
That means you don't have to compile it on every platform. Believe me, I
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
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/
...
@@ -78,20 +60,12 @@ versions of the backend) on my web site http://www.retep.org.uk/postgres/
INSTALLING THE DRIVER
INSTALLING THE DRIVER
To install the driver, the .class files have to be in the classpath. This can be
To install the driver, the .class files have to be in the classpath. To do
done in two ways:
this, copy the postgres.jar file into a directory, and add it to the classpath.
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.
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):