Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > Pro Java
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Pro Java Expert level Java questions not about a specific book. Please indicate your version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro Java section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old May 17th, 2009, 07:39 PM
Authorized User
 
Join Date: Feb 2009
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default RMI Policy File Question

Hello All,
Thanks for view my thread. I have been fighting a security manager issue for a while now. My code works fine when I do not use the security manager but when I use it I get errors. I am using RMI between a XP and Fedora machine. The code is very trivial. I am just sending a string from one machine to the next. The code below is the issue:

if (System.getSecurityManager() == null)
System.setSecurityManager ( new RMISecurityManager() {
public voud checkConnect (String host, int port){}
});

Properties props = new Properties();
props.put("java.security.policy", "C//workspace//RMI2//src//policy");


Policy file:

grant{
permission.java.security.AllPermission;
};

I'm am pretty sure it is my permissions file that I do not understand. Currently I have my permissions file in the same folder/directory as my java workspace classes. On the Fedora I was also able to put a .java.policy file in my home directory.

I also read there is suppose to be a .java.policy file in the C:\Windows folder on the XP machine but I am unsure how to do this? I would appreciate any assistance regarding the correct setup up of an RMI policy file among a Fedora and XP machine. Thanks so much again!
Dan
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple RMI policy file Question d-mart J2EE 0 May 14th, 2009 01:56 PM
Policy File n' BCP installation reagard...! yusuf.hayath BOOK: Beginning Cryptography with Java 1 June 21st, 2008 06:30 PM
RMI newbie NickTheBubble J2EE 0 December 17th, 2004 06:59 AM
how will create policy file in rmi sivapmk J2EE 1 December 10th, 2003 10:50 AM



All times are GMT -4. The time now is 08:14 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.