It depends on the magic that happens in your "somehow communicate remotely" part.
If this communication is done via RMI or a similar technology, then this will be fine. Application B will create a remote proxy to the Operation
object in JVM A, and calling methods on this proxy generate HTTP requests to JVM A, which are resolved against the actual object living in that JVM (which has access to the implementing class).
If this communication is done by serialising objects and sending them over the wire, then it will not work. When the object from application A arrives in JVM B, the deserialisation will fail (with a ClassNotFoundException
or similar).
There could well be other remoting technologies, in which case things are implementation dependent. I know that Classloaders can load classes from byte arrays, and thus it's conceptually very possible to have such classloaders that would be able to load classes from remote sources. The networking library could in theory serialise the actual class across the wire this way, I believe, so while JVM B would not natively know about the implementing class, its classloader would be provided with the class' bytecode as required.