I have 2 java netbeans projects, one is the Server other is the Client. I have a Message class that I have created which I want to pass to the server and back the other way
Make sure that Message on server side is rusl.online.examination.system.client.utility.Message
. It seems not to be the case.
If you are sending objects of a class over the socket. In order to reproduce the object at the other end, you have to cast the object. For that you will require the class definition on both ends.
Make sure you properly import the same Message
class for server program as well, which you used to create the message.