不能,因为ResultSet不能被序列化.你可以自己定义一个可序列化的类。

解决方案 »

  1.   

    yes!凡事在rmi调用中牵涉到的类,不管是参数里面的类还是返回值的类,都必须可序列化的。不过这些类不需要编译skeleton和stub,因为这些类是做值传递的,不是远程对象。
    另外,如果一个类里面有某个成员变量是不可序列化的一个类的类型,那么这个类就自动的不可序列化了,除非显示的继承那个接口并声明序列化接口。
      

  2.   

    I will be very surprised to see ResultSet can be serialized. There are some classes in Java that simply cannot be serialized, such as JDialog. How can you image you call JDialog's function from another machine? I believe ResultSet is the same thing.
      

  3.   

    Result set can be called from remote side, it's a new property in java2