Running module jar programatically

Stephane Epardaud stef at
Wed Dec 2 16:26:08 UTC 2015

I am now looking at 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 :( [not interested in IDE
suggestions or any IDE flame war].

On 02/12/15 16: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" and the module package visibility checks are
> turned off.
> What should I be looking at to load this module at runtime and run it as
> a Java module?
> Thanks, cheers.

More information about the jigsaw-dev mailing list