Specifying module paths

Robert Scholte rfscholte at apache.org
Fri Jan 15 09:06:45 UTC 2016


Op Thu, 14 Jan 2016 23:45:32 +0100 schreef Jonathan Gibbons  
<jonathan.gibbons at oracle.com>:

>
>
> On 01/14/2016 12:25 PM, ecki at zusammenkunft.net wrote:
>> Hello,
>>
>> If I understood it correctly the modules on the MP must be unique and  
>> are not merged, thats why the order inside the directory does not  
>> matter for the named modules.
>>
>> Bernd
>>
>
> Let me refine that for you ...
>
> The modules in each directory on the module path must be unique.   A  
> module with a specific name in a directory on the module path will  
> shadow (hide) any other module with the same name in a later directory  
> on the path.
>
> So, the order of directories on the module path matters (just like the  
> order of entries on a class path matters), but the "order" of entries  
> within any specific directory on the module path does not matter.
>
> -- Jon
>
>

Suppose there's a logging module and a fat module, which also contains the  
classes of the logging module, but older.
In my module-info I have
	requires logging;
	requires fat;

These modules are in the same directory. Which class is loaded first and  
why? If it is the order in the module-info, then I would also like to see  
an example of the strategy with "requires public".

thanks,
Robert


More information about the jigsaw-dev mailing list