public static File getClassJar(Class clazz) {
		File file = null;

		try {
			file = new File(clazz.getProtectionDomain().getCodeSource().getLocation().toURI());
		} catch (URISyntaxException e) {}

		return file;
	}
public static File getClassJar ( Class clazz ) { File file = null ; try { file = new File ( clazz . getProtectionDomain ( ) . getCodeSource ( ) . getLocation ( ) . toURI ( ) ) ; } catch ( URISyntaxException e ) { } return file ; }
Gets the jar file a class is contained in.

@since 1.0
@param clazz the class to get the container of
@return the jar file the class is contained in