This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am trying to bind my RMI server to registry. I always get this exception saying object already exported. I tried changing the port number of rmi registry. But didnt help. Any HInts? Please help asap.
Hi Gayatri, Please UseCodeTags while posting code. Does your server implementation extends UnicastRemoteObject? If yes, then you do not need to explicitly export it using UnicastRemoteObject.exportObject() methods. As soon as you initialize a class that extends UnicastRemoteObject, the object is exported by RMI. If you try to export a class instance that extends UnicastRemoteObject, you will always get the exception that you have mentioned.