Archived
This forum has been archived. Please start a new discussion on GitHub.
Method for setting the value of serialVersionUID in Java generated code
Hello all!
I've been having some fun issues and I was wondering if there was any way to manually set the serialVersionUID in the Java generated slice objects?
The Java side of the program needs to save and load files to disk, and every time I recompile everything it generates a new ID, despite the objects not really changing. My hope is I can just change this and so read in everything using the ObjectInputStream rather than having to define anything using XML. (Yes, I'm being lazy)
Thanks for any help,
Kat
I've been having some fun issues and I was wondering if there was any way to manually set the serialVersionUID in the Java generated slice objects?
The Java side of the program needs to save and load files to disk, and every time I recompile everything it generates a new ID, despite the objects not really changing. My hope is I can just change this and so read in everything using the ObjectInputStream rather than having to define anything using XML. (Yes, I'm being lazy)
Thanks for any help,
Kat
0
Comments
-
I am also experiencing the same issue. I am running ice 3.4.2.0
-
Hi,
This issue was addressed in Ice 3.5, fixes the computation of serialVersionUID and also add the ability to set it via metadata, see https://doc.zeroc.com/display/Ice36/Customizing+the+Java+Mapping#CustomizingtheJavaMapping-OverridingserialVersionUID
I'm afraid this fix has not been backported to 3.4.20