Hi , I am getting the following error while working with a simple Hello program for RMI.I am working on Windows NT. This error occurs when i am trying to start the server. Could anyone tell me what is going wrong. C:\rahul\SERVER1>java rahul.HelloImpl Initialising server please wait HelloImpl err: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve) java.security.AccessControlException: access denied (java.net.SocketPermission 1 22.214.171.124:1099 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.<init>(Unknown Source) at java.net.Socket.<init>(Unknown Source) at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source) at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source) 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 rahul.HelloImpl.main(HelloImpl.java:25) The programs are as follows
------------------ Suneel [This message has been edited by Suneel Setlur (edited December 13, 2000).]
Joined: Nov 27, 2000
Reason: You did not specify the policy file on the command line should be something like: java -cp . -Djava.security.policy=policyfile myprogram
Joined: Jan 18, 2001
i am haveing the same problem. the diff is that the problem is coming when i am running the client program from diff machine & try to access the client m/c Error is java.security.AccessControl.Exception(IP:socket)..... Also i am trying to connect thru the aPPLET. You have clarified the doubt But what should be the content of the policyfile & where should it be stored???