Fragments can be deployed similarly to plug-ins. If they contribute Java code, it has to be packaged in JARs before the entire fragment is packaged into a JAR suitable for inclusion in a feature. See Features for information on building and deploying a feature.
To build the fragment JAR, select "fragment.xml" and choose "Create fragment JARs..." from the popup menu. A wizard will guide you in creating a build script to produce all the required JARs.