java.security.AccessControlException in Eclipse

Posted on 2003-02-20
Medium Priority
Last Modified: 2007-12-19
I am using Eclipse IDE for an RMI application in Win2000. I have included in the CLASSPATH of the project the server_rmi.jar file, and also in the VM arguments the following line:


I get the following exception and have no idea how to get read of it. The access rights for the files are OK.

======= Exception message starts here ================

Starting MO Server failed. Details: java.security.AccessControlException: access denied (java.io.FilePermission \\X\jars\server_rmi.jar read)

========== End =======================================

============= policy file ==========================
grant {
     // Allow everything for now
     permission java.security.AllPermission;
=================== end ============================
Question by:dflorin
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
  • 2
  • 2

Expert Comment

ID: 7986120
Your codebase is wrong:





Author Comment

ID: 7986431
I found the the problem.

rmiregistry when started, had to have the CLASSPATH containing X:/jars.

Thanks anyway.

Accepted Solution

msterjev earned 800 total points
ID: 7986715
When the RMI has the jar into the classpath,then everyone need to have the jar into its classpath. This is not the concept of RMI. Try the RMI with that configuration running on two different computers, or in our case of file codebase run client that doesn't have the jar file into it's classpath.
You are question was what is wrong with the code (the exception thrown). I've answered the problem : it is how you have written the java.rmiserver.codebase (you have written invalid codebase).

Try with the suggested codebase, and rmiregistry started with classpath unset (all books says that the rmiregistry should be started with unset classpath, i.e. in a Windows console firt type: set classpath=     and then start rmiregistry)

Author Comment

ID: 7988742

You were 100% correct. It works now fine. Thanks a lot!

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses
Course of the Month8 days, 18 hours left to enroll

765 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