[postgis-users] PostGIS and Java

Gérald Quintana gerald.quintana at gmail.com
Tue Mar 4 04:54:42 PST 2008


Well I have been professionally developing in Java since 1999, so I
know what a classpath is. What I don't know is in which Jar theses
classes are located. The org.postgresql.Connection is not in
postgresql-8.2-508.*.jar, and org.postgresql.PGconnection class has
its addDataType methods deprecated and not operating.

If you read carefully my first message, you'll notice that I managed
to read geom data. But the example in the doco does not work for me, I
had to do it differently so I wonder whether I did it right or not.

The problem may be to related to the version of the JDBC driver I am
using, which one is known to work with postgis jars? I downloaded them
from http://jdbc.postgresql.org/download.html using the "8.2 Build
508" row.

Cheers,
Gérald


2008/3/4, David Potts <dave.potts at pinan.co.uk>:
> If it does't compile, then its not seeing the contents of thejar files,
>  then its a classpath issue. Its not a problem with the software, just the
>  software envronment.
>
>  The setting of a classpath is a platform specfic issues because of the
>  different file seperator used between different platforms.
>
>  On windows you say
>
>  javac -classpath D:\myprogram;D:\myprogram\lib\supportLib.jar
>  org.mypackage.HelloWorld
>
>  This instructs java on windows to look in the directories d:\myprogram and
>  d:\myprogram\lib\supportLib.jar when attempting to find classes.
>
>  On a unix boxes, you would replace the \ character with a / and the ;
>  character with a :
>
>  See http://en.wikipedia.org/wiki/Classpath_(Java) and
>  http://www.kevinboone.com/classpath.html for more information.
>
>  Please note that when you invoke your program, you will also need to
>  include the classpath.
>
>



More information about the postgis-users mailing list