Recognizing serialized object without .class-file
My system has to run in a read-only enviroment, it has to load serialized objects of a class, which .class-file isn't present. Although I have run-time access to the .class-file, and I've managed to use ClassLoader to get the Class-object from the .class-file, now I can instantiate new objects of my class. But when I try to read a serialized object of that class, it still fires a ClassNotFoundException. So what can I do?
Are you using ObjectInputStream?
You have two separate flows here. The one load a calss that is not in the class path, and the other trys to deserialize a calss. When trying to deserialize the JVM looks for the class prototype in the loaded calsses, or the calss path. You need to some how let the JVM know that the calss is loaded, and how it can find it.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center