Re: generated code and jigsaw modules

2018-10-10 Thread Richard Hillegas
Thanks, Alan. This is very helpful. On 10/10/18 9:53 AM, Alan Bateman wrote: On 10/10/2018 16:37, Richard Hillegas wrote: : java.lang.invoke.MethodHandles.lookup().defineClass(generatedClassBytes) This approach does indeed put the generated class where I want it: inside the Derby engine

Re: generated code and jigsaw modules

2018-10-10 Thread Alan Bateman
On 10/10/2018 16:37, Richard Hillegas wrote: : java.lang.invoke.MethodHandles.lookup().defineClass(generatedClassBytes) This approach does indeed put the generated class where I want it: inside the Derby engine module. Unfortunately, the ClassLoader of the generated class is the application

Re: generated code and jigsaw modules

2018-10-10 Thread Richard Hillegas
Thanks again to Rémi and Alan for their advice. Unfortunately, I have not been able to make either approach work, given another complexity of Derby's class loading. Let me explain that additional issue. Derby lets users load jar files into the database. There they live as named blobs of

Re: generated code and jigsaw modules

2018-10-04 Thread Richard Hillegas
On 10/4/18 9:45 AM, Alan Bateman wrote: On 04/10/2018 17:10, Richard Hillegas wrote: I am looking for advice about how to tighten up module encapsulation while generating byte code on the fly. I ask this question on behalf of Apache Derby, a pure-Java relational database whose original code

Re: generated code and jigsaw modules

2018-10-04 Thread Richard Hillegas
On 10/4/18 9:26 AM, Remi Forax wrote: - Mail original - De: "Richard Hillegas" À: "core-libs-dev" Envoyé: Jeudi 4 Octobre 2018 18:10:13 Objet: generated code and jigsaw modules I am looking for advice about how to tighten up module encapsulation while generating

Re: generated code and jigsaw modules

2018-10-04 Thread Alan Bateman
On 04/10/2018 17:10, Richard Hillegas wrote: I am looking for advice about how to tighten up module encapsulation while generating byte code on the fly. I ask this question on behalf of Apache Derby, a pure-Java relational database whose original code dates back to Java 1.2. I want to reduce

Re: generated code and jigsaw modules

2018-10-04 Thread Remi Forax
- Mail original - > De: "Richard Hillegas" > À: "core-libs-dev" > Envoyé: Jeudi 4 Octobre 2018 18:10:13 > Objet: generated code and jigsaw modules > I am looking for advice about how to tighten up module encapsulation > while generating byt

generated code and jigsaw modules

2018-10-04 Thread Richard Hillegas
I am looking for advice about how to tighten up module encapsulation while generating byte code on the fly. I ask this question on behalf of Apache Derby, a pure-Java relational database whose original code dates back to Java 1.2. I want to reduce Derby's attack-surface when running with a