I have a distributed application. The client and the servers share some common libraries. The client has to be compiled with a JDK 5 compiler or with target=1.5 (run anywhere also on PowerPC and CoreDuo Macs). But I would like to use SE 6 features in the server-only code.
Is it ok to compile the common libraries twice - once with a JDK 5 and once with a JDK 6 and serialize objects on the client side using class files compiled with JDK 5 and deserialize them on the server side with class files compiled with a JDK 6 and vice versa? Or will that break serialization?
What is the best practice for building libraries that should run with code that is compiled with different JDK versions?