V
vachacz
Hi !
I have a strange issue with .properties loading. I'm developing swing
application and i'd like to add internationalization. It doesn't
matter how i solved this issue, because it works i have only one
problem ...
I need several .properties files. The amount can be dinamic, and i
want to load ResourceBundles at runtime.
First use case:
- application start from $APP/app.jar
- i have a direcotry $APP/i18n where property files are located
- at runtime i list $APP/i18n files and load all bundles dinamicly
it works ... but for user simlicity i'd like to hide $APP/i18n into
$APP/app.jar (META-INF/i18n)
there is common mechanism for loading such resources
- getClass().getResource("...");
- getClass().getClassLoader().getResource("...");
i can load properties using such methods, but i don't know to list all
properties resources in current jar. is it possible to solve this
issue ?
thx for your help
£ukasz Wachowicz
ps: there's a solution to open $APP/app.jar programmatically. API to
list jar entries is avaliable, but it does not look like good
solution ...
I have a strange issue with .properties loading. I'm developing swing
application and i'd like to add internationalization. It doesn't
matter how i solved this issue, because it works i have only one
problem ...
I need several .properties files. The amount can be dinamic, and i
want to load ResourceBundles at runtime.
First use case:
- application start from $APP/app.jar
- i have a direcotry $APP/i18n where property files are located
- at runtime i list $APP/i18n files and load all bundles dinamicly
it works ... but for user simlicity i'd like to hide $APP/i18n into
$APP/app.jar (META-INF/i18n)
there is common mechanism for loading such resources
- getClass().getResource("...");
- getClass().getClassLoader().getResource("...");
i can load properties using such methods, but i don't know to list all
properties resources in current jar. is it possible to solve this
issue ?
thx for your help
£ukasz Wachowicz
ps: there's a solution to open $APP/app.jar programmatically. API to
list jar entries is avaliable, but it does not look like good
solution ...