This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]