java template perfect