Joe Ess wrote:
rajshkhr pandey wrote:Hello to all
java.lang.ClassNotFoundException: Client (no security manager: RMI class loader disabled)
Sounds to me like you are missing a security manager.
I'm going to move this to the Distributed Programming forum, where RMI is discussed.
Thanks for the reply apologies to post the in wrong forum
But when I use security manager the error again arise if java.security.AccessControlException
# Client's Contructor :
# Registering to the server
# Exception in thread "main" java.security.AccessControlException: access denied (java.net.SocketPermission 192.168.1.6:49291 connect,resolve)
# at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
# at java.security.AccessController.checkPermission(AccessController.java:546)
# at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
# at java.lang.SecurityManager.checkConnect(SecurityManager.java:1034)
# at java.net.Socket.connect(Socket.java:513)
# at java.net.Socket.connect(Socket.java:469)
# at java.net.Socket.<init>(Socket.java:366)
# at java.net.Socket.<init>(Socket.java:180)
# at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
# at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
# at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
# at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
# at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
# at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
# at Server_Stub.registerToTheServer(Unknown Source)
# at Client.main(Client.java:21)
I tried both also using all -Djavas command while running code but the result is same.
Also I have created the stub files of the Client and Server, and copied in respective folders
But the error is same.