Trying java api