Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3761776
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:40:41+00:00 2026-05-19T10:40:41+00:00

How do I sort the java.security.AccessControlException problem? When I am running the myRMIServer,I am

  • 0

How do I sort the java.security.AccessControlException problem? When I am running the myRMIServer,I am getting this exception?

My codes:

import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;

public class myRMIServer
{
        public static void main(String[] argv)
                {
                System.setSecurityManager(new RMISecurityManager());
                try
                        {
                        myRMIImpl implementation = new myRMIImpl("myRMIImplInstance");
                        }
                catch (Exception e)
                        {
                        System.out.println("Exception occurred: " + e);
                        }
                }
}

public interface myRMIInterface extends java.rmi.Remote
{
        public java.util.Date getDate() throws java.rmi.RemoteException;
}

import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;

public class myRMIImpl extends UnicastRemoteObject implements myRMIInterface
{
        public myRMIImpl(String name) throws RemoteException
                {
                super();
                try
                        {
                        Naming.rebind(name, this);
                        }
                catch(Exception e)
                        {
                        System.out.println("Exception occurred: " + e);
                        }
                }
        public java.util.Date getDate()
                {
                return new java.util.Date();
                }
}

Output

Exception occurred: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve)

How do I solve this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T10:40:42+00:00Added an answer on May 19, 2026 at 10:40 am

    Define a .policy file that grants the required permissions, and name it in a java.security.policy argument.

    Or get rid of the security manager. It’s only required if you are using the RMI codebase feature.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I exported a working Selenium test case to Java, running it via selenium-rc's selenium-server.jar
The other day I decided to write an implementation of radix sort in Java.
is there any sort of XY-Layout to Java? So I can set a Button
This must be a very basic question for Java developers, but what is the
I have this java swing application that I intend to sell over the internet.
What are common Java vulnerabilities that can be exploited to gain some sort of
I'm looking for a shortcut, preference or plugin in Eclipse which will sort Java
How do I do a bubble sort in java, The text file looks like
What would be the best and most efficient way to sort a Java Vector
I would like to sort an array in ascending order using C/C++ . The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.