Merge "Reimplement reopenStdio in Java."