failed IPC in java. change to C