Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z5KFh-00025W-6R for pgsql-jdbc@arkaria.postgresql.org; Wed, 17 Jun 2015 20:48:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Z5KFg-0007GW-Lr for pgsql-jdbc@arkaria.postgresql.org; Wed, 17 Jun 2015 20:48:04 +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 1Z5KFf-0007ET-1T for pgsql-jdbc@postgresql.org; Wed, 17 Jun 2015 20:48:03 +0000 Received: from smtprelay05.ispgateway.de ([80.67.31.97]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Z5KFb-0000Q8-Lz for pgsql-jdbc@postgresql.org; Wed, 17 Jun 2015 20:48:01 +0000 Received: from [88.66.14.101] (helo=Zauselmaus) by smtprelay05.ispgateway.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.84) (envelope-from ) id 1Z5KFZ-0004Ay-U6 for pgsql-jdbc@postgresql.org; Wed, 17 Jun 2015 22:47:58 +0200 From: "Markus KARG" To: "'List'" References: <000c01d0a7b6$97571ee0$c6055ca0$@eu> <005101d0a86a$f18ffe90$d4affbb0$@eu> <60b20bb834cf54db8232239b9c27fcc2@imap.procolix.com> In-Reply-To: Subject: Re: Pre-processing during build Date: Wed, 17 Jun 2015 22:48:04 +0200 Organization: Markus KARG, Staatl. gepr. Inf. Message-ID: <003801d0a93e$e8ed59c0$bac80d40$@eu> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0039_01D0A94F.AC7629C0" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdCo5r4oQ/aPqXGbT52HghwIwOMrIgAWB7QA Content-Language: de X-AVK-Virus-Check: AVA 25.1869;71FD75 X-AVK-Spam-Check: 1; str=0001.0A0C0205.5581DCFD.0096,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0; F1206 X-Df-Sender: bWFya3VzQGhlYWRjcmFzaGluZy5ldQ== X-Pg-Spam-Score: -2.6 (--) 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 This is a multi-part message in MIME format. ------=_NextPart_000_0039_01D0A94F.AC7629C0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Even plain Java can do this, once the example is corrected: = https://gist.github.com/mkarg/88a89ae0dbffcfb7543e =20 =20 From: pgsql-jdbc-owner@postgresql.org = [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Dave Cramer Sent: Mittwoch, 17. Juni 2015 12:16 To: Mark Rotteveel Cc: List Subject: Re: [JDBC] Pre-processing during build =20 =20 On 17 June 2015 at 03:07, Mark Rotteveel wrote: On Wed, 17 Jun 2015 00:02:40 +0300, Vladimir Sitnikov wrote: > 2015-06-16 22:30 GMT+03:00 Markus KARG : >> The answer is pretty simple: Try it out. :-) >> >> Just compile a JRE 8 class down to byte code level 6 and load it on Java >> level 7. That's what I proposed. Nothing else. It really bet will = work >> unless you try to INSTANTIATE JRE-only classes, but it should LOAD. = And >> nothing more we need. > > Markus, can you please be more explicit in your suggestion? > > I did try a simple "Hello, world" and it does not run in stock JDKs of > MacOS: https://gist.github.com/vlsi/aeeb4a61d9c2b67ad213 > Even if you manage to make that fly, that would be built on sand. Good example: it demonstrates at least that using reflection (eg getDeclaredMethods; or in this case privateGetDeclaredMethods) will lead = to a NoClassDefFoundError. =20 I'm not sure this is a great example as Optional itself is a java 8 = construct. =20 Either way Spring is able to do this, as are others? =20 Dave Cramer dave.cramer(at)credativ(dot)ca http://www.credativ.ca =20 =20 ------=_NextPart_000_0039_01D0A94F.AC7629C0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Even plain Java can do this, once the example is corrected: https://gist.= github.com/mkarg/88a89ae0dbffcfb7543e

 

 

From:= = pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] = On Behalf Of Dave Cramer
Sent: Mittwoch, 17. Juni 2015 = 12:16
To: Mark Rotteveel
Cc: List
Subject: = Re: [JDBC] Pre-processing during build

 

 

On 17 = June 2015 at 03:07, Mark Rotteveel <mark@lawinegevaar.nl> wrote:

On Wed, 17 Jun 2015 = 00:02:40 +0300, Vladimir Sitnikov
<sitnikov.vladimir@gmail.com> wrote:
> 2015-06-16 22:30 GMT+03:00 Markus KARG <
markus@headcrashing.eu>:>> The answer is pretty simple: Try it out. = :-)
>>
>> Just compile a JRE 8 class down to byte code = level 6 and load it on
Java
>> level 7. That's what I = proposed. Nothing else. It really bet will work
>> unless you = try to INSTANTIATE JRE-only classes, but it should LOAD. And
>> = nothing more we need.
>
> Markus, can you please be more = explicit in your suggestion?
>
> I did try a simple = "Hello, world" and it does not run in stock JDKs of
> = MacOS: https://gist.github.com/vlsi/aeeb4a61d9c2b67ad213> Even if you manage to make that fly, that would be built on = sand.

Good example: it demonstrates at least that using = reflection (eg
getDeclaredMethods; or in this case = privateGetDeclaredMethods) will lead to
a = NoClassDefFoundError.

 

I'm not sure this is a great example as Optional = itself is a java 8 construct.

 

Either way Spring is able to do this, as are = others?

 


Dave = Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

 

------=_NextPart_000_0039_01D0A94F.AC7629C0--