Add dependency of Java on Hierachy target.