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.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL