java_gen: fix java_gen on NFS

Reviewer: @rlane