Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

RMI AccessControlException - VM parameter

Posted on 2003-10-27
1
Medium Priority
?
363 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 500 total points
ID: 9627072
Have you tried (URL format)

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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

718 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