0

Is there some library or tool which allows to serialize object including it's .class file? So when some application want's to deserialize that object, it can load it's .class first and than successfully deserialize the object even if that objects class wasn't on the classpath before.

I was searching for such library but couldn't find one. Nevertheless I was able to quickly implement simple case of such serialization library so I think there should be some mature implementation available.

Ondrej Bozek
  • 10,987
  • 7
  • 54
  • 70
  • I don't think normal Java supports this. But you could try to hack something together by serializing it as a byte array and then feeding it to a custom classloader on the other end. Of course your classloaders and permissions will be different. – Antimony Oct 25 '13 at 13:25
  • Yes, thats exactly what I did. I'm just asking if there is already some more mature implementation available. – Ondrej Bozek Oct 25 '13 at 13:48
  • Some library offering this functionality. There are quiet a few serialization libraries but none of them offers such functionality. – Ondrej Bozek Oct 25 '13 at 13:51

0 Answers0