开发者

Verifying that classes on server and client are identical

开发者 https://www.devze.com 2023-02-14 07:17 出处:网络
In a 开发者_JAVA百科Java RMI Client/Server application, is there a way to verify that the classes on the server and client are identical?Use the codebase feature so that they are single-sourced from t

In a 开发者_JAVA百科Java RMI Client/Server application, is there a way to verify that the classes on the server and client are identical?


Use the codebase feature so that they are single-sourced from the codebase server.


Well, you always have access to the bytes that make up the class (thru getResourceAsStream), and so if you really needed to, you can grab the bytes on the client and send them to the server, and compare.

Not sure why you need to go to this extent, normally all you care about is the serialization formats which is verified by the serialVersionUID value in the serializable class.

0

精彩评论

暂无评论...
验证码 换一张
取 消