I'm experimenting with RMI lately and found out that I seem to be unable to send a serialized object if the class file isn't also stored at the webserver. Does this mean that all my serializable classes need to be put in the webservers classpath?
Doesn't really seem like the best design to me IMHO.
No. All these answers are wrong.
The classes don't need to exist at both sides if you use the RMI codebase feature. You can set up a Web server to host the JAR files and set -Djava.rmi.server.codebase= to define where those classes are available as a list of URLs of those JAR files. You set that at either the server or the client or both depending on who is going to be sending classes that the other side doesn't have. Then RMI annotates those classes with those URLs so the target knows where to get them, and downloads them as needed.