Search code examples
javarmirmic

Java RMI warning


I have created an RMI client server and it works exactly how I want it to however, when I switched back to my laptop from the library computers, I found that the following warning occurs when I wish to compile my server with rmic server:

Warning: generation and use of skeletons and static stubs for JRMP is deprecated. Skeletons are unnecessary, and static stubs have been superseded by dynamically generated stubs. Users are encouraged to migrate away from using rmic to generate skeletons and static stubs. See the documentation for java.rmi.server.UnicastRemoteObject.

I'm confused as to where this error has come from and need to recompile my program as while it works I need to change a print statement which is incorrect. Does anyone have an idea as to why I'm receiving this error and how I can resolve/get round it?


Solution

  • The warning indicates that the version (or just the configuration) of the Java compiler changed. As the warning says​, you should no longer use rmic to generate stubs, but use dynamic stubs generated automatically. If you only get a warning, your code should still work... Anything else is hard to say without any code.