Generating java