Solved

RMI AccessControlException - VM parameter

Posted on 2003-10-27
1
349 Views
Last Modified: 2006-11-17
I'm running an RMI server application with the VM parameter:
-Djava.security.policy=file:"C:\RMITest"\rmi.policy
and everything works fine.
When I'm trying to set that parameter using:
System.setProperty("java.security.policy", "file:\"C:\\RMITest\"\\rmi.policy"); // the first line in code
I get the following exception:
java.security.AccessControlException: access denied (java.io.FilePermission server.properties read)
      at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
      at java.security.AccessController.checkPermission(AccessController.java:401)
      at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
      at java.lang.SecurityManager.checkRead(SecurityManager.java:887)
      at java.io.FileInputStream.<init>(FileInputStream.java:100)
      at java.io.FileInputStream.<init>(FileInputStream.java:66)
      ...
Why?
Is there a way to avoid that VM parameter?
0
Comment
Question by:s_lavie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
amswain earned 125 total points
ID: 9627072
Have you tried (URL format)

"file:///C:/RMITest/rmi.policy"
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This video teaches viewers about errors in exception handling.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question