Here are my assumptions, which you can correct.

1. A jar or classes directory placed on a class path are treated as part of the 
unnamed module
2. A jar containing a module-info file is treated as a module when placed on a 
module path, and restricts access to non-exported packages
3. A jmod file is only usable on the module path.

If a class directory or a jar function as modules when placed on the class 
path, what is the point of a separate module path? And even in that case, 
doesn’t it make sense to treat a class directory as part of the unnamed module 
in general? That makes this problem go away completely. It doesn’t provide 
access to third parties, as code would not be distributed as loose classes.

- Russ


> On Mar 23, 2016, at 10:05 AM, Alan Bateman <alan.bate...@oracle.com> wrote:
> 
> 
> 
> On 23/03/2016 13:02, Russell Gold wrote:
>> :
>> 
>> Why does the module concept even need to exist at that point? Seems to me 
>> that it is much simpler to treat them as classes on the class path rather 
>> than a module. The module status can come in during packaging, no?
>> 
> I'm not sure that I understand your mail. Are you asking why are modules are 
> supported at compile-time? Or are you asking why the compiler doesn't allow 
> packages to be split between the unnamed module and a named module?
> 
> -Alan.

Reply via email to