You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Robert Munteanu <ro...@apache.org> on 2013/05/31 22:31:31 UTC
Re: Problems whit ResourceBundle
Hi Lissuan,
> Is possible load ResourceBundle inside a OSGi bundle? , because every time
> I do , a resource Missing Exception is throw , somebody help me?
What have you tried, and how did it fail?
Robert
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Problems whit ResourceBundle
Posted by Neil Bartlett <nj...@gmail.com>.
This sounds like the problem. You don't pass the complete name of the
properties file, only the "basename " which excludes the locale suffixes
and the .properties extension.
Please check the JavaDocs for ResourceBundle for full details.
Regards
Neil
On Fri, May 31, 2013 at 10:34 PM, Lissuan Fadraga Artiles
<lf...@uci.cu>wrote:
> I try with a properties file that is in the same package of a class Y ,
> the code:
>
> ResourceBundle bundlePrueba = ResourceBundle.getBundle(direccionRecurso,
> Locale.getDefault(), loader);
>
> The loader variable is the Classloader of the class Y
> The direccionRecurso is the complete name of the file X
>
> Regard's Lissuan..
>
>
>
> -----Mensaje original-----
> De: Robert Munteanu [mailto:rombert@apache.org]
> Enviado el: viernes, 31 de mayo de 2013 15:32
> Para: users@felix.apache.org
> Asunto: Re: Problems whit ResourceBundle
>
> Hi Lissuan,
>
> > Is possible load ResourceBundle inside a OSGi bundle? , because every
> > time I do , a resource Missing Exception is throw , somebody help me?
>
>
> What have you tried, and how did it fail?
>
> Robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
> http://www.uci.cu
>
> http://www.uci.cu
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
RE: Problems whit ResourceBundle
Posted by Lissuan Fadraga Artiles <lf...@uci.cu>.
I try with a properties file that is in the same package of a class Y , the code:
ResourceBundle bundlePrueba = ResourceBundle.getBundle(direccionRecurso, Locale.getDefault(), loader);
The loader variable is the Classloader of the class Y
The direccionRecurso is the complete name of the file X
Regard's Lissuan..
-----Mensaje original-----
De: Robert Munteanu [mailto:rombert@apache.org]
Enviado el: viernes, 31 de mayo de 2013 15:32
Para: users@felix.apache.org
Asunto: Re: Problems whit ResourceBundle
Hi Lissuan,
> Is possible load ResourceBundle inside a OSGi bundle? , because every
> time I do , a resource Missing Exception is throw , somebody help me?
What have you tried, and how did it fail?
Robert
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
http://www.uci.cu
http://www.uci.cu
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org