Application with mix of module and jars
vishal jain
nitw.vishal at gmail.com
Mon Jun 20 23:06:18 UTC 2016
This works :
java -mp mlib -addmods module2 -cp jars/nonmodule.jar
nonmodule.NonModuleClass
NonModule Say Hello
Whereas this does not :
java -modulepath mlib -addmods ALL-MODULE-PATH -cp jars/nonmodule.jar
nonmodule.NonModuleClass
Error: Main method not found in class nonmodule.NonModuleClass, please
define the main method as:
public static void main(String[] args)
On Mon, Jun 20, 2016 at 1:51 PM, <mark.reinhold at oracle.com> wrote:
> 2016/6/20 12:20:51 -0700, alan.bateman at oracle.com:
> > ...
> >
> > If you add `-addmods module1` to the command line then I assume it will
> > work. The reason you need this is because there isn't any module that
> > has declared a dependency on "module1". The "Root modules" section in
> > JEP 261 [1] has the details on the root modules to resolve at startup.
> >
> > -Alan
> >
> > [1] http://openjdk.java.net/jeps/261
>
> Handy direct link: http://openjdk.java.net/jeps/261#Root-modules
>
> (URI fragment identifiers FTW!)
>
> - Mark
>
--
Best Regards,
Vishal Jain
More information about the jigsaw-dev
mailing list