Re: [BUGS] BUG #2220: PostgreSQL-JDBC 8.1-404 fails to compile with - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: [BUGS] BUG #2220: PostgreSQL-JDBC 8.1-404 fails to compile with
Date
Msg-id Pine.BSO.4.61.0601292251090.11308@leary.csoft.net
Whole thread Raw
List pgsql-jdbc

On Sun, 29 Jan 2006, Bernhard Rosenkraenzer wrote:

> Bug reference:      2220
> Description:        PostgreSQL-JDBC 8.1-404 fails to compile with ecj
> Details:
>
> PostgreSQL-JDBC 8.1-404 fails to compile (ecj bytecode compiler w/ gij 4.1
> JDK):
>

This is because the driver dynamically decides what version of the driver
to build (JDBC2, JDBC3, or JDBC3 w/ generics) at runtime based on the
current JVM.  You are running ant with a 1.5 JVM, but ecj's default
-source argument is 1.4, so it's trying to build 1.5 code, but
interpreting it as 1.4 code which cleary fails.  Adding "source=1.5" in
the <javac> tag in build.xml fixes this, but that's not a general
solution because it clearly won't be able to build other versions.  Do you
have a better solution for runtime determination or specification of the
version we should try to build.

Kris Jurka

pgsql-jdbc by date:

Previous
From: Georg Hintermaier
Date:
Subject: Re: copy patch question: byte format and efficiency
Next
From: Guillaume Cottenceau
Date:
Subject: Re: error note