Refactored JavaBuilder.