Conventions for multi platform code and resources

Stephen Winnall steve at
Fri Feb 24 13:35:52 PST 2012

I was thinking of something like the I18N ResourceBundle conventions, so you could have


But it's more complicated because I18N could also apply on top of that. The problem isn't limited to JavaFX either, I think. Are there any Java conventions for this in the broader context?

Nor am I sure how to handle Linux (per distro? per desktop/KDE/Gnome?).


On 24 Feb 2012, at 21:01, Richard Bair wrote:

> That's a good question, one that has been on my periphery but hasn't had any attention. As of today, I am not aware of any conventions for platform or locale specific FXML / CSS. I wonder, embed name of FXML file or CSS file in a resource bundle and look it up?
> On Feb 24, 2012, at 9:19 AM, Stephen Winnall <steve at> wrote:
>> What conventions exist in JavaFX for naming and retrieving multi-platform code and resources? The obvious example to me would be CSS files: an application might be identical - in the ideal case - on all platforms, but have different CSS files for each platform to handle details for those platforms. What conventions are in place for naming and distinguishing those CSS files?
>> For I18N we have ResourceBundles: is there anything similar for JavaFX resources? Taking the analogy further, besides resources like CSS files, there may be also Java classes which are platform-specific, as in I18N. There may be other resources too, like FXML files which are platform-specific.
>> Steve

More information about the openjfx-dev mailing list