Changed behaviour of ResourceBundle#getBundle()

Martin Lehmann martin.lehmann at
Tue Feb 14 11:15:45 UTC 2017

Hi Alan,

thanks for that explanation. 

If I understand this correctly: Assume that I have two modules M and N , both containing eg a properties file and both files need to get encapsulated. Then M and N have to choose *different* package names for where to put the file, right? Because of split package problem...?!

Isn't Jigsaw's default to "encapsulate all" (so anything which is not explicitely exported or opened is per default encapsulated)? Why is this not also the default for resources in the unnamed package or in a "not-a-package place"? Sounds incosistent to me.


-----Original Message-----
From: jigsaw-dev [mailto:jigsaw-dev-bounces at] On Behalf Of Alan Bateman
Sent: Monday, December 12, 2016 5:57 PM
To: Gunnar Morling <gunnar at>
Cc: jigsaw-dev <jigsaw-dev at>
Subject: Re: Changed behaviour of ResourceBundle#getBundle()

On 12/12/2016 15:29, Gunnar Morling wrote:

> :
> It seems to be related to the fact that the bundle is located in the 
> default package, because the expected exception is raised if the 
> bundle is located in a proper package.
Right, resources in the unnamed package or with names that don't map to packages in the module are not encapsulated. So what you are seeing is correct.


More information about the jigsaw-dev mailing list