String isolateId = "consumer1";
String vmArg = "-Djava.isolate.id=" + isolateId;
String[] vmArgs = new String[] { vmArg };
new OutOfProcessIsolate(sb, null, vmArgs, Consumer.class.getName());
new InProcessIsolate(sb, null, vmArgs, Consumer.class.getName());
Output
[exec]
[exec] OUT OF PROCESS CONSUMER ID comsumer1
[exec] IN PROCESS CONSUMER ID null <- This should be consumer1
String vmArg = "-Djava.isolate.id=" + isolateId;
String[] vmArgs = new String[] { vmArg };
new OutOfProcessIsolate(sb, null, vmArgs, Consumer.class.getName());
new InProcessIsolate(sb, null, vmArgs, Consumer.class.getName());
Output
[exec]
[exec] OUT OF PROCESS CONSUMER ID comsumer1
[exec] IN PROCESS CONSUMER ID null <- This should be consumer1