Xcode hasn't shipped with Java project templates since version 3.1 or 3.2. If you want to use Xcode for Java, create an external build system project and tell the project to use the Java compiler or ant as the build tool.
You would be better off using something other than Xcode for Java development. Eclipse and NetBeans have better support for Java than Xcode does. The text editor TextMate 2 comes with a bundle that lets you compile and run Java programs from inside TextMate.