• 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

Signed jar becomes unsigned if loaded by URLClassLoader

 
Ranch Hand
Posts: 174
Java ME Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am loading a signed jar file (named a.jar) by URLClassLoader.

After that, if I try to invoke some method that needs more permissions than sandboxed (I am trying this in applet), I am getting java.security.AccessControlException: (access denied). Why?
If I load this a.jar file by specifying it in applets tag "archive" attribute, everything works just great. How comes that URLClassLoader looses this signature information (and trust)?
 
Greenhorn
Posts: 2
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi! It seems to I have similar problem. I solved it. Description here:
http://stackoverflow.com/questions/7446009/signed-applet-loads-signed-jar-files-using-urlclassloader-with-security-issue
.

Basic solution is to create custom SecurityManager which will permit all you need and substitute system manager with yours.

For example, manager who permits all.





 
Zandis Murāns
Ranch Hand
Posts: 174
Java ME Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, thanks a lot, man!
 
it's a teeny, tiny, wafer thin ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic