Add JavaDependency

Alternative to #30852.