roger wong wrote:Can rmi server and client be in one java process?
Sure. That would be an unusual thing to do, and rather pointless too, but there's no reason it couldn't be done.
If can, does the rmi internal implementation remove the marshalling or unmarshalling so that the performance is improved?
I can't say for sure, but if I were designing RMI, I wouldn't bother with that "performance improvement" because nobody in real life would ever use RMI in that way. So I doubt it.