Forums Register Login
Sealing Jars

I have never tried the Jar Sealing facility of Java before, but was in the area and thought I'd try it. But it doesn't seem to have the effect I expected.

As a first step, I added a manifest to all my Jars. Example (taken directly from the Jar): -

Now I know that several of my packages have their contents spread around two Jars (an interface and an implementation Jar). I thought that sealing all the Jars would therefore cause a SecurityException, verifying that I had successfully sealed them (*). But in fact, the whole application ran fine.

My program has a custom class loader for all classes, though the loading of most classes eventually ends up being done by the system class loader. My program has no SecurityManager. But I thought that Jar sealing was independent of class loader and required no SecurityManager.

Any suggestions why I didn't get a SecurityException?

(*) If I'd not failed at the first hurdle, I'd probably have gone on to restrict sealing to a subset of my Jars.
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards

This thread has been viewed 350 times.

All times above are in ranch (not your local) time.
The current ranch time is
Mar 21, 2018 19:02:57.