Hi,
I want to use gravatar on my java project but i cant find a api for it. Is there any option to do this? How can i use gravatar like get-post statement?

Gravatar ‘APIs’ require no authentication, and are all based around simple HTTP GET requests. Use the links below to find out more about constructing request URLs, different implementation options and more.

Gravatar calls himself as “A Globally Recognized Avatar”. And yes you can use it in your projects like java, jsp or jsf. On wordpress you do not need anything , it is included by default. Gravatar use md5 hash so mail bots cant use it for spam.

String email = "help@gravatar-api.com.tr";
String hash = MD5Util.md5Hex(email);

And this is the java code you want(for avatar image only, you can also check link for gravatar profile)

import java.util.*;
import java.io.*;
import java.security.*;
public class MD5Util {
  public static String hex(byte[] array) {
      StringBuffer sb = new StringBuffer();
      for (int i = 0; i < array.length; ++i) {
	  sb.append(Integer.toHexString((array[i]
	      & 0xFF) | 0x100).substring(1,3));
      }
      return sb.toString();
  }
  public static String md5Hex (String message) {
      try {
	  MessageDigest md =
	      MessageDigest.getInstance("MD5");
	  return hex (md.digest(message.getBytes("CP1252")));
      } catch (NoSuchAlgorithmException e) {
      } catch (UnsupportedEncodingException e) {
      }
      return null;
  }
}

For developer resources you can use this link “http://en.gravatar.com/site/implement/”