File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Distributed Java and the fly likes ProcessBuilder start() and RMI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "ProcessBuilder start() and RMI" Watch "ProcessBuilder start() and RMI" New topic

ProcessBuilder start() and RMI

Arun Subbu

Joined: Aug 30, 2003
Posts: 25
I have a server application that has a remote object(call it A). I register it with RMI. I dont run rmic to generate the stubs, but before I bind the object to registry, I do exportObject on the fly and then register it.

Now my server process will spawn new processes and they in turn will talk to my remote objects. The client process also has some remote objects(call it B). But I dont register them with RMI registry, rather pass them as parameters when I call the remote object A's methods. ie A.somethod(B).

To launch the new process, I use ProcessBuilder's start() method. They work fine in my machine in the developemnt environment. But it does not work in my collegues machine.(also development env). The process gets started, but the newly started process never calls back the method in my server object.

Could someone help me what is going wrong here. Also I am not setting any RMISecurityManager either in my server process or in client process. Do I need to set one?

Any help would be appreciated.

It is sorta covered in the JavaRanch Style Guide.
subject: ProcessBuilder start() and RMI
It's not a secret anymore!