*
* @param args
*/
public static void main(String[] args) {
Link cl = Isolate.getLinks()[0];
CommandRunner cr;
try {
ObjectLinkMessage message = (ObjectLinkMessage) cl.receive();
cr = (CommandRunner) message.extract();
Map<String, String> env = cr.getEnv();
int envSize = (env == null) ? 0 : env.size();
byte[][] binEnv = new byte[envSize * 2][];
if (envSize > 0) {
int i = 0;
for (Map.Entry<String, String> entry : env.entrySet()) {
binEnv[i++] = entry.getKey().getBytes();
binEnv[i++] = entry.getValue().getBytes();
}
}
NativeProcessEnvironment.setIsolateInitialEnv(binEnv);
} catch (Exception e) {
Unsafe.debugStackTrace(e.getMessage(), e);
return;
}
cr.run();
}