• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

help to avoid SecuriyAcessControl Exception

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
i write a simple rmi program which throw exception :

Exception in thread "main" java.security.AccessControlException: access
denied (
java.net.SocketPermission qasim resolve)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:272)
i dont know how to avoid this exception i do following changes in java.policy but its not working
grant codeBase "file:///f:/java/*" {
permission java.security.AllPermission;
};
my code is reside in f:\java\bank\
please help me to prevent this error..
thank in advance..
Qasim Shabbir
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi:
Forgive me Qassim for really not replying. Actually, I am facing the very same problem...only our java.policy files look a little different. Here's the exception that I am getting:

The java.policy file looks like this:

And the first few lines of server program code look like this:

The command to start the server looks like this:

I feel like killing the exception now....
Thank you
 
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Varun,
Seems like for some reason the runtime can't find your java.policy file. Try modifying the default policy file jre/lib/security/java.policy and see if the exception goes away?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic