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 9009871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:18:47+00:00 2026-06-16T02:18:47+00:00

I am just following a tutorial on how to send files using RMI. Tutorial:

  • 0

I am just following a tutorial on how to send files using RMI.

Tutorial: Link

I encounter an error when i try to run my server. The only change i have made different from the tutorial is i have changed my port to 1097 instead of the default 1099.

How can i resolve this error?

This is the error i receive:

C:\Program Files\Java\jdk1.7.0_09\bin\FT_RMI>java -Djava.security.policy=policy.
txt FileServer
FileServer: access denied ("java.net.SocketPermission" "127.0.0.1:1097" "connect
,resolve")
java.security.AccessControlException: access denied ("java.net.SocketPermission"
 "127.0.0.1:1097" "connect,resolve")
        at java.security.AccessControlContext.checkPermission(Unknown Source)
        at java.security.AccessController.checkPermission(Unknown Source)
        at java.lang.SecurityManager.checkPermission(Unknown Source)
        at java.lang.SecurityManager.checkConnect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown S
ource)
        at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown S
ource)
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
        at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
        at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
        at sun.rmi.server.UnicastRef.newCall(Unknown Source)
        at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
        at java.rmi.Naming.rebind(Unknown Source)
        at FileServer.main(FileServer.java:11)

Line 11 is Naming.rebind().

Here:

FileInterface fi = new FileImpl("FileServer");
     Naming.rebind("//127.0.0.1:1097/FileServer", fi);

I have tried changing the address to localhost, but the same error occurs.

SOLUTION

Point to the specific java policy file, either in JRE folder or a specific policy file.

java -Djava.security.policy="C:\\FT_RMI\\java.policy" FileServer
  • 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-06-16T02:18:48+00:00Added an answer on June 16, 2026 at 2:18 am

    You have to allow the socket connect on your security properties under JRE. You can see this under jre/lib/security/java.policy

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

Sidebar

Related Questions

I just installed xcache on my server (Fedora 16) following the tutorial on http://xcache.lighttpd.net/wiki/InstallFromSource
I'm just learning django and following a tutorial. I have a Link and a
I just installed Mezzanine on my linux server. Following the tutorial, with the command
I'm following a tutorial to send emails using gmail, however what I get is
I am just following a very simple microsoft tutorial, at the topic Create a
Issue Using the following just simply doesn't work properly in -webkit- and -moz- browsers:
getting following error: SMTP -> ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo failed:
I'm learning WPF and started with this MSDN tutorial. I was just following the
I have just started learning pthreads API and I am following the tutorial here
I am following this tutorial . All is going well until I try create

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.