Reputation: 3607
I have a class MyClass with a open() and release() method.
process1 invoke the open(), and if process2 startup , the release() should be invoked in process1 firstly and then invoke the open()
PS: process1 and process2 are two different process.
How to do it ?
Upvotes: 0
Views: 82
Reputation: 310875
Yes. You can export a remote object from a JVM and call its methods remotely from another JVM process or indeed another host. This is called Remote Method Invocation (RMI).
Upvotes: 1