You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Patrick Forhan <fe...@muddyhorse.com> on 2009/02/16 20:35:13 UTC

Re: Bringing Felix bundles up-to-date.

Long ago, Richard and I were discussing URLs going to and from strings and such:

2008/9/4 Richard S. Hall <he...@ungoverned.org>:
>>>>  - we could no longer load images from a Class.getResource() URL like
>>>> bundle://56.0:1/org/bjc/pt2/i18n/mock/background.png
>>>
>> Basically, we have an i18n bundle that constructs a Swing ImageIcon
>> for us, based on a URL.  That ImageIcon is passed to other bundles,
>> but it shouldn't have any trouble loading data from that URL, since it
>> was created by the same bundle.
>>
> How is the URL being constructed? There were some changes in this area. If it is being manually constructed or converted to a String then
> back to a URL, then this could be the cause of the issue.

Is there a way to change this?  Can I go to a pure string mode back
into a url?  I vaguely think I saw a configuration property along
these lines.

Thanks,

Pat.

-- 
Defy mediocrity.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Bringing Felix bundles up-to-date.

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Patrick Forhan wrote:
> Long ago, Richard and I were discussing URLs going to and from strings and such:
>
> 2008/9/4 Richard S. Hall <he...@ungoverned.org>:
>   
>>>>>  - we could no longer load images from a Class.getResource() URL like
>>>>> bundle://56.0:1/org/bjc/pt2/i18n/mock/background.png
>>>>>           
>>> Basically, we have an i18n bundle that constructs a Swing ImageIcon
>>> for us, based on a URL.  That ImageIcon is passed to other bundles,
>>> but it shouldn't have any trouble loading data from that URL, since it
>>> was created by the same bundle.
>>>
>>>       
>> How is the URL being constructed? There were some changes in this area. If it is being manually constructed or converted to a String then
>> back to a URL, then this could be the cause of the issue.
>>     
>
> Is there a way to change this?  Can I go to a pure string mode back
> into a url?  I vaguely think I saw a configuration property along
> these lines.
>   

You can go from URLs to Stings and back, but it is generally not a good 
idea if you can avoid it (especially if you are constructing a String 
first, since this is platform specific). You need URL Handlers enabled 
to convert a String to a URL.

-> richard
> Thanks,
>
> Pat.
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org