On 21/09/2016 12:48, Martin Lehmann wrote:

:
But with the new module system, classes on the unnamed package are no longer
allowed. The compiler rejects them with "error: unnamed package is not
allowed in named modules".
I am wondering what's going to happen with resources on the "unnamed path",
so to say.

It's not uncommon that resources like a "log4j.properties" are put and
searched on the top-level path - i.e. the equivalent of the unnamed (class)
package.

What will happen to that at compile time (probably nothing?), at packaging
time (jar does complain?) and at runtime?
Resources in the "top-level directory" aren't encapsulated (as a module module can't contain types in the unnamed package as you noted) so no issue when compiling, packaging or at runtime.

-Alan

Reply via email to