Remove circular dependency from the Java build.

refs #841