RMI java does not create skeleton class

I wrote a remote service, MyremoteImpl.java, and used the following command after compiling it.

rmic MyRemoteImpl 

I found out that this method involves creating a stub class and a skeleton class, but I can only see the stub class, why?

Another problem that I encountered after starting rmiregistry, I started the service, but it gives the following error, I doubt that I get this error because I am missing a skeleton class?

  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 

Please help me solve this, thanks in advance!

+4
source share
2 answers

Do not do this. You do not need it. Skeletal classes have not been required since 1998.

+3
source

Starting with rmic 1.2, Java does not generate a skeleton class. The new JRMP protocol supported for RMI has eliminated the use of skeleton files.

The skeleton for the remote object is the server side of the JRMP protocol, which has a method that sends calls to implement the real remote object.

0
source

Source: https://habr.com/ru/post/1333543/


All Articles