Patrick Forhan wrote:
Long ago, Richard and I were discussing URLs going to and from strings and such:
2008/9/4 Richard S. Hall <[email protected]>:
- 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: [email protected]
For additional commands, e-mail: [email protected]