posted 21 years ago
Hi everybody.
I am building a RMI Application but I am having some problems, locating the RMI registry, which I start with my server.
I know I will only have that server running in that machine (and only one RMI server), so the code looks like this:
In the future I am to replace the "1100" for a parameter, probably read from a properties file.
My server class will be running in a machine named PANORAMIX, inside the local area network.
My clients, which will be run on machines named like ASTERIX, OBELIX, IDEAFIX, ... need to get the RMI registry that I create when I start my server. The code I am using in the clients is:
The parameters, are again to be replaced by values read from properties file.
I am running the clients with
which has the following content
When I had the clients and the server both running in the same machine, ie, the security file had only one SocketPermission line: java.net.SocketPermission "127.0.0.1", "accept, connect, listen, resolve";
and I used LocateRegistry with "127.0.0.1", everything worked fine. Now that I have put them to run on different machines, I can no longer get to the RMI registry from the clients.
The exception text is "refused to connect".
Any help concerning this would be most appreciated.
Thank you.
Sun Certified Programmer for the Java 2 Platform 1.4<p>If I can create, I will make mistakes. If I can learn with them, it must be some kind of art.