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


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/


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