Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
|
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE 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 14th, 2009, 01:56 PM
Authorized User
 
Join Date: Feb 2009
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default Simple 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
Policy File n' BCP installation reagard...! yusuf.hayath BOOK: Beginning Cryptography with Java 1 June 21st, 2008 06:30 PM
Simple Question ironchef Java GUI 0 September 14th, 2006 04:56 PM
Simple question happyheart_man Pro VB.NET 2002/2003 0 January 14th, 2004 11:38 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.