@@ -31,18 +31,16 @@ http://jakarta.apache.org/ant/index.html and download the binary. Being pure
31
31
java it will run on virtually all java platforms. If you have any problems
32
32
please email the INTERFACES list.
33
33
34
- Once you have ANT, cd to the src directory and type "ant". This will compile
35
- the correct driver for your JVM, and build a .jar file (Java ARchive) called
36
- postgresql.jar
34
+ Once you have ANT, run the configure script in the top-level directory with
35
+ the --with-java option. Then proceed with 'make' and 'make install' as
36
+ usual. This will compile the correct driver for your JVM, and build a .jar
37
+ file (Java ARchive) called postgresql.jar. The file will be installed in
38
+ the directory PREFIX/share/java.
37
39
38
40
That jar file will contain the driver for _your_ version of the JDK.
39
41
40
- Note: As of 7.1, you build from pgsql/src and not pgsql/src/interfaces/jdbc.
41
- Well you can, but building from the top will also build some extra utilities
42
- located under /contrib at the same time. Also later on (either 7.1.1 or 7.2)
43
- it's intended to have the main configure script to build the driver
44
- automatically if it finds both a JDK & ANT installed, so this is the first step
45
- towards that.
42
+ Note: As of 7.1, you can build from the top-level directory or from
43
+ src/interfaces/jdbc.
46
44
47
45
REMEMBER: Once you have compiled the driver, it will work on ALL platforms
48
46
that support that version of the API. You don't need to build it for each
@@ -52,8 +50,8 @@ That means you don't have to compile it on every platform. Believe me, I
52
50
still hear from people who ask me "I've compiled it ok under Solaris, but it
53
51
won't compile under Linux" - there's no difference.
54
52
55
- I advise you don 't try running javac outside of ANT as it builds some classes
56
- on the fly .
53
+ Don 't try to run javac directly. Don't try to run ant directly. Neither
54
+ will work .
57
55
58
56
Possible problems
59
57
@@ -75,12 +73,11 @@ More details are in the Implementation file src/interfaces/jdbc/Implementation
75
73
76
74
INSTALLING THE DRIVER
77
75
78
- To install the driver, the .class files have to be in the classpath. To do
79
- this, copy the postgres.jar file into a directory, and add it to the classpath.
76
+ To install the driver, the .class files have to be in the classpath.
80
77
81
78
ie: under LINUX/SOLARIS (the example here is my linux box):
82
79
83
- export CLASSPATH=.:/usr/local/lib /postgresql.jar
80
+ export CLASSPATH=.:/usr/local/pgsql/share/java /postgresql.jar
84
81
85
82
Please don't be tempted to extract the files from the .jar file. There are a
86
83
lot of files in there, and you may break the Exception handling.
0 commit comments