To add to this, it's not just a question of making more sense. Compiling the code with Java 7 means the generated class files are version 51, which is not acceptable to a Java 5 JRE - it wants version 49. So the existing pre-built jar cannot simply be dropped into a Java 5 app.
To get around this I'm trying to build from source without much more success. When I follow the recommendation of using a 1.5 JDK, for some reason ant still craps out with an UnsupportedClassVersionError. I also tried to hack the build.xml to force compilation with source="1.5" and target="1.5", but then the compilation fails like this: compile: [javac] /opt/sean/software/postgresql-jdbc-9.0-802.src/build.xml:120: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds [javac] Compiling 176 source files to /opt/sean/software/postgresql-jdbc-9.0-802.src/build [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.5 [javac] /opt/sean/software/postgresql-jdbc-9.0-802.src/org/postgresql/Driver.java:47: error: org.postgresql.Driver is not abstract and does not override abstract method getParentLogger() in java.sql.Driver [javac] public class Driver implements java.sql.Driver [javac] ^ [javac] /opt/sean/software/postgresql-jdbc-9.0-802.src/org/postgresql/ds/PGConnectionPoolDataSource.java:39: error: PGConnectionPoolDataSource is not abstract and does not override abstract method getParentLogger() in CommonDataSource [javac] public class PGConnectionPoolDataSource extends BaseDataSource implements Serializable, ConnectionPoolDataSource [javac] ^ [javac] /opt/sean/software/postgresql-jdbc-9.0-802.src/org/postgresql/ds/PGPooledConnection.java:26: error: PGPooledConnection is not abstract and does not override abstract method removeStatementEventListener(StatementEventListener) in PooledConnection etc. Does anyone have a solution for people like me who must use Java 5? Thanks, Sean -- View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-7577-JDBC-Driver-Compiled-with-Java-7-tp5726254p5728220.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs