• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Sealing Jars

 
Ranch Hand
Posts: 1970
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic