Let say we are in a java execution and the program must to create an instance of an object in another jvm (the cause is not important here: Could be memory limits or problems with static attributes)
How can I do that?
I know that Runtime.getRuntime().exec("java ClassName") could do that, but I would preffer better solutions.
Anyone know how?
-
Launch jvm outside jvm (1 messages)
- Posted by: Tim Prize
- Posted on: May 05 2004 12:46 EDT
Threaded Messages (1)
- Launch jvm outside jvm by Paul Strack on May 05 2004 21:51 EDT
-
Launch jvm outside jvm[ Go to top ]
- Posted by: Paul Strack
- Posted on: May 05 2004 21:51 EDT
- in response to Tim Prize
Let say we are in a java execution and the program must to create an instance of an object in another jvm (the cause is not important here: Could be memory limits or problems with static attributes) How can I do that? I know that Runtime.getRuntime().exec("java ClassName") could do that, but I would preffer better solutions. Anyone know how?
You could set up some kind of RMI service in the other JVM, and use it to create objects. This give you the option to move the other JVM to a remote machine if need be.