Update Java version dependency versions.
Add type parameter to avoid raw types in Java versions.