Fix subprocess error in java