Compilation feedback and version question
scolebourne at joda.org
Thu Oct 29 11:25:58 UTC 2015
On 28 October 2015 at 23:59, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> On 28/10/2015 20:50, Stephen Colebourne wrote:
>> Just to note that my experiments of the last 2 hours suggest that
>> "java -listmods" does not show user modules in its output, only JDK
>> java -mp jmods -listmods
> -listmods will list the names of the modules in the application's module
> graph. In this case, there isn't any initial module (application) specified
> so it defaults to the system modules. I expect this will do what you want:
> java -mp jmods -addmods org.joda.convert -listmods
So, after about an hour yesterday, I did try that and it still didn't
work. That must have been because jmod doesn't work fully. I've tried
it now, and with -addmods it does find the modular jar file.
However, my feedback is that the -listmods option is confusing. An
option called "list" is something I expect to list all things, not to
be clever and only show some subset. At the very least, I consider it
vital for there to be a tool (preferably java.exe) that can list *all*
available modules given a module path. Maybe the current -listmods
should be renamed to -applicationmods or -initialmods, or split to
-listmods:app and -listmods:all ? (Being able to list everything
available feels like module 101).
Note to Alex Buckley's response, I haven't used the link or image
levels yet. The feedback above applies without using those tools.
>> My experiments also only worked with modular jar files. The jmod
>> generated files were not recognized as modules at all.
> There are a few open issues around the JMOD format. At this time (and stated
> in JEP 261), JMOD files can only be used at compile-time or link-time. So
> for now at least, they are ignored at run-time.
Bear in mind that the help/usage text of the jar.exe tool has not been
updated. As such, jmod.exe looks like its the only thing capable of
working with modules.
More information about the jigsaw-dev