i am currently writing a java game with a peer-to-peer "network protocol". This means i send object over the network to the other game.
As the development goes on i add and remove stuff. I change the game and it becomes eventually incompatible with older versions.
Now i want to store the current version number in the protocol object i send over the network and every time i make i change i could update the version and thus detect in code if the two game instances are compatible.
My question is: What is the standard class to save a version number in java?
I search for something which provides me major, minor and patch level versions, is comparable etc.
Its pretty hard to google such a class..