• 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

policy file question

 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey all, i really havent had any experience with
policy file, do you think it would be appropriate
to just include the default java.policy that
came with JDK? I really havent played much with
policy stuff.
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would pull out all the PropertyPermission elements simply because they aren't releveant to the client-server interaction. And, since you're not being timed as part of your code evaluation, it certainly wouldn't hurt to learn a little about the range of permissions available.
For starters, run policytool -- it's good for making changes to the policy file without worrying about typos.
Also, take a look at the JDK permissions page, for future reference if not for the exam.
 
Andre Tow
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Michael!
 
Andre Tow
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
having a problem, heres java.policy
-----------------------------------
grant codeBase "file:../dist/server.jar" {
// allows anyone to listen on un-privileged ports
permission java.net.SocketPermission "localhost:1024-", "listen";
permission java.io.FilePermission "../build/-","read";
};
here is error:
--------------
access denied (java.io.FilePermission \\..\build\suncertify\server read)
here is code that executes program
----------------------------------
java -Djava.security.policy=../etc/java.policy -Djava.rmi.server.codebase="file://../build/suncertify/server/" -jar ../dist/server.jar
I'm not sure why its having problems registering
with a previously running rmiregistry, it worked
before,but for the life of me, i cannot figure out what might have changed.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic