1. Add joda-time maven dependency to your Java 1.7 Project
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.7</version>
</dependency>
2. Format date string and use LocalDate and Years classes for age calculating:
import org.joda.time.LocalDate;
import org.joda.time.Years;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
....
String dateString = "12.05.1990";
DateTimeFormatter dtf = DateTimeFormat.forPattern("dd.MM.yyyy");
LocalDate dateOfBirth = dtf.parseLocalDate(dateString);
LocalDate now = new LocalDate();
Years age = Years.yearsBetween(dateOfBirth, now);
System.out.println(age.getYears());