Re: Running module jar programatically

2015-12-08 Thread Stephane Epardaud
Oh, OK thanks a lot. Will try that and let you know. I feel I'm really close now :) On 08/12/15 17:26, Alan Bateman wrote: > Layer.boot().modules() will give you the set of jlr.Module objects for > the module in the boot layer but that is probably not what you want. > > From your mail then it sou

Re: Running module jar programatically

2015-12-08 Thread Alan Bateman
On 08/12/2015 16:07, Stephane Epardaud wrote: OK, so now I have Java 9 + Jigsaw load my module's main method, and in there I need to call a class from another module by reflection. That other module is in the module path, and I know its name and version. I can't use the boot class loader because

Re: Running module jar programatically

2015-12-08 Thread Stephane Epardaud
OK, so now I have Java 9 + Jigsaw load my module's main method, and in there I need to call a class from another module by reflection. That other module is in the module path, and I know its name and version. I can't use the boot class loader because it's not on the class path (it's on the module p

Re: Running module jar programatically

2015-12-02 Thread Neil Bartlett
The Java 9 support in Eclipse Neon is fairly limited right now. It understands the new layout of the JRE and puts the platform modules on your build classpath. It does not however understand the syntax of module-info.java, so you will get red error markers in these files, and you will need to co

Re: Running module jar programatically

2015-12-02 Thread Dalibor Topic
On 12/2/15 5:26 PM, Stephane Epardaud wrote: > Of course it does not help that I have to do this all outside of my IDE > as Eclipse doesn't know about Java 9 yet :( See https://marketplace.eclipse.org/content/java-9-support-beta-neon cheers, dalibor topic -- Oracle Dal

Re: Running module jar programatically

2015-12-02 Thread Alan Bateman
On 02/12/2015 15:24, Stephane Epardaud wrote: Hi, I have a modular jar produced by Java 9 EA + Jigsaw, I can run it with "java -mp mlib -m my.module", but how can I run it programmatically in Java? ATM I'm using URLClassLoader to load it and run it, but I _think_ it does not make it "modular" a

Re: Running module jar programatically

2015-12-02 Thread Stephane Epardaud
I am now looking at http://cr.openjdk.java.net/~mr/jigsaw/spec/api/ and Layer, ModuleClassLoader and Configuration. Once I make sense of this, I suspect it will answer my question. Of course it does not help that I have to do this all outside of my IDE as Eclipse doesn't know about Java 9 yet :( [

Re: Running module jar programatically

2015-12-02 Thread Stephane Epardaud
A bit off-topic, but I wanted to clarify something, in case my many questions sound negative: I think you guys have done a tremendous job with Jigsaw, and IMO the hardest is behind you, I can see there was a huge amount of work (well, you started it in Java 7…) to get to his point, and I feel that

Running module jar programatically

2015-12-02 Thread Stephane Epardaud
Hi, I have a modular jar produced by Java 9 EA + Jigsaw, I can run it with "java -mp mlib -m my.module", but how can I run it programmatically in Java? ATM I'm using URLClassLoader to load it and run it, but I _think_ it does not make it "modular" and the module package visibility checks are turn