I'm refactoring some legacy code and have come across an unexplained setting of the property java.rmi.server.ignoreStubClasses
to true
. But after some googling I'm still not sure that I fully understand its use.
As I understand it, this property controls whether you should use stub classes generated by rmic
or not. If that is correct it should be safe to remove this since this code was written in Java 1.7 and has never used rmic
.
Is this correct?
If it works without it, you don't need it. The case it addresses is when you have exported citing a port number, which is sufficient not to need a stub, but stubs are present anyway, in which case they will be used when exporting. That would also require the stubs to be present at the client, and available to the Registry if you bind the object. It's simpler to just delete stubs and their generation from the build.