不好意思,上面写错了,第3个文件是CalculatorClient.java不是Calculator.java

解决方案 »

  1.   

    A NotBoundException is thrown if an attempt is made to lookup or unbind in the registry a name that has no associated binding.
      

  2.   

    试图lookup一个没有相关binding的名字
    可能问题出在这里
    你lookup的是CalculatorServer
    而CalculatorServer中rebind的名称却是CalculatorService
      

  3.   

    呵呵,我终于找到了是rmi.localhost/CalculatorServer这句话错了,应该是rmi://localhost:1099/CalculatorService,但还是谢谢