Add Java dependency.