connecting over LAN problems

Hi, I'm trying to get a sample program going over a small desktop - laptop lan (both running windows 98se and named "desktop" and "laptop" on the network).

The program works fine when both server and client are on the same computer, but when I copy the client files to my laptop and run from there, I cannot connect, and get the following message:

java.security.AccessControlException: access denied (java.net.SocketPermission Desktop resolve)

here are some code snippets:

policy file on both server and client:

grant {

permission java.net.SocketPermission "*:1024-65535","connect,accept";

permission java.net.SocketPermission "*:80", "connect";

};

server:

Naming.rebind("//Desktop/helloObj", theRemoteObj);

client:

RmIntfc c1 = (RmIntfc)Naming.lookup("rmi://Desktop/helloObj");

I've seen similiar questions about setting up RMI over a LAN on the forums, but there weren't any corresponding answers! I'd like to try the simplest approach, ie, no webserver.

Thanks for any help!!

[1088 byte] By [r_stich] at [2007-9-26 1:19:37]
# 1

Hi

The problem is probably with the client-side permissions rather than the server. It may be that the permission file that you've set up is not being used, or that the permission syntax is not quite correct.

Try granting AllPermission to all codebases (on the client) and see if you can get the system working. Once you get it working, then you can be more selective with the permissions.

Regards

Matthew

hrpmrl at 2007-6-29 0:52:22 > top of Java-index,Core,Core APIs...