I'm facing lot of problems with the Java Security policy. I just cant seem to over ride it ! I want to run a simple server program using RMI. At first I used to get the error :
java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1024 connect,resolve)
Later, I created a "java.policy" file whose contents are:
/* AUTOMATICALLY GENERATED ON Tue Sep 14 18:15:27 BDT 2005*/ /* DO NOT EDIT */ grant { permission java.security.AllPermission; };and I saved this file in my server programs folder and ran the server program with the following command
java -Djava.security.policy=java.policy -Djava.rmi.server.codebase=file:///c:\rmi\server\ MyServer. Now I get this strange exception:
java.rmi.ServerException: Server RemoteException; nested exception is:java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:java.lang.ClassNotFoundException: MyServer_Stub
It says that the "MyServer_Stub.class" cannot be found but the class file is present both in the server folder and the client folder.
Pls Help !! Any sorta help wud be greatly appreciated.
Thanx in advance