Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

policy file question

 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
Thanks Michael!
 
Andre Tow
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • 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.
 
If you send is by car it's a shipment, but if by ship it's cargo. This tiny ad told me:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic