Cannot launch RMI Fibonacci server

后端 未结 2 1356
孤城傲影
孤城傲影 2021-01-28 00:26

I am learning Java RMI and I have created a very simple server that calculates Fibonacci numbers. The server (FibonacciServer) creates an object responsible for calculating the

相关标签:
2条回答
  • 2021-01-28 01:06

    It's not finding the codebase. The reason is that, as of JDK 7, the java.rmi.server.useCodebaseOnly property is true by default, whereas in prior releases it was false by default.

    When property is false then it uses the code base of sever but in true case it ignores it.

    http://docs.oracle.com/javase/7/docs/technotes/guides/rmi/enhancements-7.html

    Your problem would resolve in lower JDK. ex JDK6

    0 讨论(0)
  • 2021-01-28 01:13

    The Registry doesn't have the named class available on its CLASSPATH and/or you haven't set up the codebase correctly, if at all. You don't have to use the codebase feature, but if you do it has to be correct. An easier way out of this may be to start the Registry in the server JVM, via LocateRegistry.createRegistry().

    0 讨论(0)
提交回复
热议问题