Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z4kq2-0008PL-UV for pgsql-jdbc@arkaria.postgresql.org; Tue, 16 Jun 2015 06:59:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Z4kq2-0007u3-FP for pgsql-jdbc@arkaria.postgresql.org; Tue, 16 Jun 2015 06:59:14 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Z4kq1-0007tt-Iv for pgsql-jdbc@postgresql.org; Tue, 16 Jun 2015 06:59:13 +0000 Received: from smtp.procolix.com ([95.215.185.30]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1Z4kpy-0006lQ-8P for pgsql-jdbc@postgresql.org; Tue, 16 Jun 2015 06:59:12 +0000 Received: from localhost (localhost [127.0.0.1]) by smtp.procolix.com (Postfix) with ESMTP id ED1D943D3C for ; Tue, 16 Jun 2015 08:59:05 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at smtp.procolix.com Received: from smtp.procolix.com ([127.0.0.1]) by localhost (host436.procolix.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d2+2Zrsbk+nd for ; Tue, 16 Jun 2015 08:59:04 +0200 (CEST) Received: from webmail.procolix.com (webmail.procolix.com [95.215.185.106]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mark@lawinegevaar.nl) by smtp.procolix.com (Postfix) with ESMTPSA id AB37843B49 for ; Tue, 16 Jun 2015 08:59:04 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: Tue, 16 Jun 2015 08:59:04 +0200 From: Mark Rotteveel To: Subject: Re: Pre-processing during build In-Reply-To: <000c01d0a7b6$97571ee0$c6055ca0$@eu> References: <000c01d0a7b6$97571ee0$c6055ca0$@eu> Message-ID: X-Sender: mark@lawinegevaar.nl User-Agent: RoundCube Webmail/0.2 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org On Mon, 15 Jun 2015 23:59:45 +0200, "Markus KARG" wrote: > If it would be up to me, I would try to get rid of pre-processing if any > possible, since it is a real p.i.t.a., as long as we can find a different > solution to provide the same number of supported JDKs and JDBC versions. > > The question is: How? Possibly by simply using "JRE8-JDBC42.jar" ALWAYS? For Java 6 and 7 it would be possible to use the same codebase (if you ignore certain types iirc), but for Java 8 you need a separate library due to the introduction of the SQLType interface. And if you fully support JDBC 4.2, you also need the classes from java.time. > Has anybody tried whether it is possible to simply load a JRE8-JDBC42.jar > on > JRE6? I mean, not to actually invoke the new JDBC42 APIs, just to load the > JAR and invoke the JDBC3 APIs only for example. The APIs themselved are > backwards compatible, and as long as we don't invoke the new APIs, no > ClassNotFound should happen (AFAIK the JRE loads classes only at first > actual instantiation, but not simply because it is contained in a loaded > .class file as a parameter). I mean, as long as we do not use JRE8-only > APIs > inside the Driver, and as long as we don't write the .class files in JRE8 > byte code, certainly. > > Or did I miss something in this theoretical approach? JDBC APIs themselves are not backwards compatible (ie: they introduce new types in the signature, or require you to handle new types in existing methods), the API is only backwards compatible from the perspective of the user. Mark -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc