stub类和skel类必须跟其他类在同一个目录,请检查一下http://www.javayou.com

解决方案 »

  1.   

    跟那些类啊?我得stub类和skel类在server目录下跟Server类在同意目录下message
        |-MessageServer.class
    server
        |-Server.class,Server_Skel.class、Server_Stub.class
    client
        |-Client.class
      

  2.   

    运行的时候需要这个参数:
    -Djava.rmi.server.codebase=http://host/usrname这个CODEBASE可以是URL连接 http://
    也可以是一个本地的文件 file:///  要注意的是,使用URL和本地文件的时候,policy文件的设置是不一样的:一个要设置允许打开的段口,一个要设置允许读取的目录
      

  3.   

    运行时
    >start java -Djava.rmi.server.codebase=file:/d:\study\rmi\test -Djav
    a.security.policy=server.policy test.Server依然同样的错误,快疯掉了,高手帮忙啊!