Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Pro Java
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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





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 07:59 AM
how will create policy file in rmi sivapmk J2EE 1 December 10th, 2003 11:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.