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: Per Bothner <per at bothner dot com>
- To: alex mitchell <lexaay at gmail dot com>
- Cc: "kawa at sourceware dot org" <kawa at sourceware dot org>
- Date: Wed, 09 Jun 2010 00:51:53 -0700
- Subject: Re: Security exception when using resource-url in an applet
- References: <C8342C45.25340%lexaay@gmail.com>
On 06/08/2010 02:20 AM, alex mitchell wrote:
I had tried creating a more generalized version, working in scheme rather
than java, but kept getting errors saying that getResource was not a method.
In colon notation if CLASS is a Class then CLASS:M refers to the static
member of CLASS, rather than an instance method of java.lang.Class.
So in this case you need to use the invoke syntax:
(invoke CLASS 'getResource "foo")
What's weird is that this works:
(invoke ((this):getClass) 'getResource "applettest.class")
when written directly in the applet, but modifying
ResourceStreamHandler.makeURL to:
return clas.getResource("applettest.class")
fails.
I'm rather puzzled by what could be causing this.
--
--Per Bothner
per@bothner.com http://per.bothner.com/