Hi all.
I need some help to run my first RMI application.
I have read
Java's RMI tutorial and I developed a small application.
my server and remote object implementation exist in the following dirs :
C:\public\com\server\RemoteInterface.class
C:\public\com\server\RemoteInterfaceImpl.class
C:\public\com\server\RemoteInterfaceImpl_Stub.class
C:\public\com\server\RemoteInterfaceImpl_Skel.class
C:\public\runner\ServerRunner.class
my client code locates (and contains) the following dirs :
E:\public\com\server\RemoteInterface.class
E:\public\com\server\RemoteInterfaceImpl.class
E:\public\client\MyClient.class
I have create the following java.policy file :
to run the server, I wrote :
C:\>set CLASSPATH=.;public
java -Djava.rmi.server.codebase=file:/c:\public/ -Djava.rmi.server.hostname=localhost
-Djava.security.policy=java.policy
the server is running ok..
to run the client :
E:\>set CLASSPATH=.;public
java -Djava.rmi.server.codebase=file:/e:\public/ -Djava.security.policy=java.polich client.MyClient
but I got the following exception :
AccessControlException, access denied.
(SocketPermission 127.0.0.1 :1099 connect, resolve)
may I ask you for some help please ???