java - Receiving through ObjectInputStream() without having the class -


i'm trying make server receives object implements interface x sent client through objectinputstream ().

better explain: want make server receives object through interface without having class on server side.

because of objectinputstream () deserialize object, class must exist on server side, if not, occur classnotfoundexception ().

is there other way pass object through socket without having class of him on other side? i'm searching different ways same objectinputstream, without having class on server side. if thre's no way of that, must upload class time on server, objectinputstream can deserialize , dont throws classnotfoundexception.

thanks.

if don't want instantiate object, can keep in byte[] buffer. instantiate it, need rmi: provide remote class loader sender.

but typically solutions using different serialisation mechanism better case. think protobuf, json or similiar.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -