[java] use native arrays for wrapped captured variables