Skip to main content

Loading already signed JAR

1 reply [Last post]
dekz
Offline
Joined: 2010-07-04

I have a JAR file that attempts to perform some self integrity checks (as in it attempts to look for itself and perform some HMAC comparisons).

It seems to fail in use (possibly because of the way it attempts to find itself).

Any suggestions or should I attempt the route of creating a custom class loader.

Message was edited by: dekz

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
chihiro_saito
Offline
Joined: 2006-11-08

Hi Dekz,

I'm not sure what you're trying to do exactly, but if the classes in the jar is being loaded, then the xlet classloader knows about the jar already. ???

Defining a ClassLoader subclass is a hard one for BD-J, I don't think the spec permits it (RuntimePermission is never granted for xlets). The only classloader that the Xlet is known to be able to reliably create is URLClassLoader, via newInstance(..). If you create it from the xlet code, then the parent classloader would be the xlet classloader, so your jar should be visible there.

Chihiro