Improve Java dependency.