Suppose when there is a Employee POJO class. I have serialized the Employee Object to the file System. I have moved that file to the different system. If i want to deserialize the object, do i need to include the Employee class file in the class path.
If you check the Javadoc page for ObjectInputStream and its readObject method you will see that it will throw a ClassNotFoundException if "Class of a serialized object cannot be found." So yes, the class needs to be available on the system where you deserialize the object.