我编写了一个远程服务MyremoteImpl.java,并在编译后使用以下命令:
rmic MyRemoteImpl
我了解到这个方法应该创建存根类和骨架类,但我只能看到存根类,为什么?
在运行rmiregistry后,我遇到了另一个问题:我启动了服务,但它却出现了以下错误,我怀疑我是否因为缺少骨架类而得到了这个错误?
java.net.MalformedURLException: invalid URL String: Remote Hello
at java.rmi.Naming.parseURL(Unknown Source)
at java.rmi.Naming.rebind(Unknown Source)
at RMIservice.MyRemoteImpl.main(MyRemoteImpl.java:22)
Caused by: java.net.URISyntaxException: Illegal character in path at index 6: Remote Hello
at java.net.URI$Parser.fail(Unknown Source)
at java.net.URI$Parser.checkChars(Unknown Source)
at java.net.URI$Parser.parseHierarchical(Unknown Source)
at java.net.URI$Parser.parse(Unknown Source)
at java.net.URI.<init>(Unknown Source)
at java.rmi.Naming.intParseURL(Unknown Source)
... 3 more
请帮我解决这个问题,提前感谢!!!