This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Security exception when using resource-url in an applet
- From: alex mitchell <lexaay at gmail dot com>
- To: Per Bothner <per at bothner dot com>, "kawa at sourceware dot org" <kawa at sourceware dot org>
- Date: Tue, 08 Jun 2010 10:44:23 +0800
- Subject: Re: Security exception when using resource-url in an applet
Thanks, I'll give that a try.
Alex
On 6/6/10 6:20 AM, "Per Bothner" <per@bothner.com> wrote:
> On 06/05/2010 02:56 AM, alex mitchell wrote:
>> I'm trying to load a text file from an applet. I've put the text file into
>> the same .jar file as the applet. I'm planning to use resource-url to get
>> the URL of the file, and then open-input-file with the URL, but at this
>> point all I'm doing is getting the URL.
>
>
> resource-url creates a magic URL using a custom URLStreamHandler.
> Unfortunately, it appears you can't do that in applets.
> We probably need to switch to using the standard getResource
> mechanism directly.
>
> The easiest fix wouldbe to just change module-uri for class
> FOO to do FOO.class.getResource("FOO.class"). I'm not sure
> what the downsides of that would be - I need to remind myself
> why I implemented the class-resource: URL scheme.